trying to connect to database
Posted: Thu Nov 24, 2005 4:14 pm
Parse error: parse error, unexpected T_LOGICAL_OR in /home/gaming/mysql_connect1.php on line 4
thats the error
heres the code
where have i gone wrong?
thats the error
heres the code
Code: Select all
<?php
$dbcnx = mysql_connect("localhost", "gaming_phpbb1", "password");
or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("gaming_phpbb1");
function escape_data1 ($data){
global $dbh;
if (ini_get('magic_quotes_gpc')){
$data = stripslashes($data);
}
return mysql_real_escape_string (trim ($data), $dbh);
}
?>