CODE
<html>
<body>
<?
$con = mysql_connect('localhost', '********', '********');
if(!$con){
die();
echo 'Mysql did not connect: ' . mysql_error();
}
if(mysql_select_db('robocookie_userdb', $con)){
echo 'Database selected <br />';
} else {
die();
echo mysql_error();
}
if (mysql_query("CREATE TABLE users(id INT, username Varchar(255), password Varchar(255)")){
echo 'Table Created';
} else {
echo 'Table not created';
die();
echo mysql_error();
}
?>
</body>
</html>
<body>
<?
$con = mysql_connect('localhost', '********', '********');
if(!$con){
die();
echo 'Mysql did not connect: ' . mysql_error();
}
if(mysql_select_db('robocookie_userdb', $con)){
echo 'Database selected <br />';
} else {
die();
echo mysql_error();
}
if (mysql_query("CREATE TABLE users(id INT, username Varchar(255), password Varchar(255)")){
echo 'Table Created';
} else {
echo 'Table not created';
die();
echo mysql_error();
}
?>
</body>
</html>
This is what the page looks like-
QUOTE
Database selected
Table not created
Table not created
What's up? Is my code wrong or is it Zymic? My code is right by w3schools standards.