Jump to content

Parse error:syntax error,unexpected 'or' (T_LOGICAL_OR)


xanie

Recommended Posts

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());

 

?>

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());
}

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.