|
-- Posted by RossTheHoss69 at 5:53 pm on Mar. 25, 2008
Okay, anytime I create a PHP file to try and make a new MySQL database using the line: | Code: | CREATE DATABASE testdb; ?> | I get: Parse error: syntax error, unexpected T_STRING in C:\xampp\htdocs\xampp\69.php on line 3. I'm using Apache. Help? Why am I getting this message?
-- Posted by allsmiles at 9:17 am on Mar. 26, 2008
It needs to be | Code: | mysql_connect('serveraddress','username','password'); mysql_query("CREATE DATABASE testdb"); ?> |
-- Posted by PiXiE at 9:21 am on Mar. 26, 2008
mysql =/= php. That is why you need mysql_query().
|