avatar.alex Posted January 27, 2011 Share Posted January 27, 2011 Ok this code doesn't look wrong but i cant figure out whats going on? <?php //connect.php $server = 'localhost'; $username = 'admin'; $password = 'pass'; $database = 'gms'; if(!mysql_connect($server, $username, $password)) { exit('Error: could not establish database connection'); } if(!mysql_select_db($database) { exit('Error: could not select the database'); } ?> ERROR Parse error: syntax error, unexpected '{' in /home/adee67/public_html/forum/connect.php on line 13 Quote Link to comment Share on other sites More sharing options...
parino_esquilado Posted January 27, 2011 Share Posted January 27, 2011 if(!mysql_select_db($database) You are missing a bracket on line 12. It should be: if(!mysql_select_db($database)) Quote Link to comment Share on other sites More sharing options...
avatar.alex Posted January 27, 2011 Author Share Posted January 27, 2011 Thank you so much. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.