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';