hello !
what's wrong with this code ?!
<?php
$host = 'localhost';
$user = 'portal';
$password = 'sinner156';
$db_name = 'outcast';
MySQL_connect("$host","$user","$password");
MySQL_select_db("$db_name") or die("Could not select database");
$sql = ("CREATE TABLE user_login (username CHAR(20) NOT NULL, password CHAR(10) NOT NULL); CREATE TABLE user_info (name CHAR(50) NOT NULL, lastname CHAR(50) NOT NULL, age CHAR(50) NOT NULL, sex CHAR(1) NOT NULL, birth_day CHAR(2) NOT NULL, birth_month CHAR(50) NOT NULL, birth_year CHAR(4) NOT NULL, hobby CHAR(255) NOT NULL, email CHAR(50) NOT NULL, nick CHAR(20) NOT NULL, irc CHAR(20) NOT NULL, msn CHAR(50) NOT NULL, icq CHAR(20) NOT NULL, yahoo CHAR(20) NOT NULL, describe TEXT NOT NULL);");
$result = mysql_query($sql);
if ($result)
{
echo("Table(s) created successfully<br><br>");
}
else
{
echo("error when creating table(s)<br><br>");
}
echo mysql_error();
MySQL_close();
?>
it returns:
"error when creating table(s)
You have an error in your SQL syntax near '; CREATE TABLE user_info (name CHAR(50) NOT NULL, lastname CHAR(50) NOT NULL, ag' at line 1"
do you have some ideea ?