Hi,
I am having problem with my code can anybody help it is giving me this error
Parse error: parse error, expecting `T_FUNCTION'on line 4.
Here is my code
<?php class database
{
$dbconnect=NULL;
$dbhost="localhost";
$dbuser="root";
$dbpass="";
$dbname="db_student_info";
function db_connect()
{
global $dbhost,$dbuser,$dbpass,$dbname;
if(!$dbconnect)
$dbconnect=mysql_connect($dbhost,$dbname,$dbpass);
if(!$dbconnect)
{return 0;}
else if(!mysql_select_db($dbname))
{
return 0;
}
else{
return $dbconnect;
}
}
}?>
thanx in advance