View Single Post
  #3 (permalink)  
Old 07-29-2007, 11:31 PM
HelloWorld's Avatar
HelloWorld HelloWorld is online now
PT Admin
Awards Showcase
Quality Tutorial 
Total Awards: 1
Join Date: Jun 2007
Location: In front of computer...
Posts: 1,118
iTrader: (0)
HelloWorld is a jewel in the roughHelloWorld is a jewel in the roughHelloWorld is a jewel in the rough
Quote:
Note that mysql_error() is only for your benefit. You don't want that to actually be shown to users (and potential script kiddies and others with the intent to breach your security).
Thanx a lot for this rpgfan3233!
but it seems not working... probably I should give the full source code:

admin/index.php
PHP Code:
<?php
$username 
'username';         // mySQL username
$password 'password';     // mySQL password
$host 'localhost';    // mySQL host

$link mysql_connect($host,$username,$password) or die(mysql_error());
$query 'CREATE TABLE mycms ('.
         
'id INT NOT NULL AUTO_INCREMENT KEY'.
         
'username VARCHAR(10) NOT NULL, '.
         
'password VARCHAR(10) NOT NULL)'
         
$result mysql_query($query);
?>
I also tried to use:
PHP Code:
$host 'localhost:3306'

__________________
PHP Code:
System.out.println("Hello World!"); 

Digg this Post! Del.Icio.Us this Post! Technorati this Post! Furl this Post! Mister Wong this Post! Newsvine this Post! Spurl this Post! Reddit this Post! Netscape this Post!
Reply With Quote