xanie Posted January 10, 2013 Share Posted January 10, 2013 (edited) can someone help me with this one Parse error:syntax error,unexpected 'or' (T_LOGICAL_OR) in config/db.php on line 2 here is my code.. tnx <?php $db=@mysql_connect('localhost', 'root', '')or die (mysql_error()); mysql_query("SET NAMES 'utf8'"); @mysql_select_db('ozlo',$db)or die (mysql_error()); ?> Edited January 10, 2013 by xanie Quote Link to comment Share on other sites More sharing options...
Dharmender Posted January 10, 2013 Share Posted January 10, 2013 Try like this $conn = mysql_connect( $serverName, $uid,$pwd); if (!$conn) { die('Could not connect: ' . mysql_error()); } $select=mysql_select_db($databasename,$conn); if(!$select) { die('could not select db'.mysql_error()); } 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.