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 Link to comment https://forums.phpfreaks.com/topic/225833-connect-error/ 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)) Link to comment https://forums.phpfreaks.com/topic/225833-connect-error/#findComment-1165922 Share on other sites More sharing options...
avatar.alex Posted January 27, 2011 Author Share Posted January 27, 2011 Thank you so much. Link to comment https://forums.phpfreaks.com/topic/225833-connect-error/#findComment-1165926 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.