PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
<?
include('connect.php');
$sql = mysql_query("CREATE TABLE users( user_id INT(11) NOT NULL AUTO_INCREMENT, username VARCHAR(255) NOT NULL FULL TEXT, password VARCHAR(32) DEFAULT 0 NOT NULL FULL TEXT, email VARCHAR(255) NOT NULL FULL TEXT, homepage VARCHAR(255) NOT NULL FULL TEXT, aim VARCHAR(100) NOT NULL FULL TEXT, date_format VARCHAR(50) NOT NULL FULL TEXT, date_join INT(11) DEFAULT 0 NOT NULL, post_last MEDINT(9) DEFAULT 0 NOT NULL, post_total MEDINT(9) DEFAULT 0 NOT NULL, PRIMARY KEY(user_id))");
echo 'Creating table: ''users''....';
?>
Last edited by Wldrumstcs on Tue Feb 15, 2005 4:06 pm, edited 1 time in total.
In PHP, when a variable is set to something, it isn't actually evaluated UNTIL it is referenced.
since $sql is never referenced, mysql_query never gets executed. Try just using it as a function instead of storing it as a variable.