Fatal error: Cannot redeclare class DB in C:\***\htdocs\smile\admin\function.php on line 5
so this is functions line 5 is class DB{
<?php require('vars.php');class DB{ function query($query){ mysql_connect($mysqllocation,$mysqlusername,$mysqlpassword) or die('Connection Failed'); mysql_select_db($mysqldatabase) or die("Unable to select database"); mysql_query($query) or die('Query Error'); mysql_close(); } function row($query){ $connect = mysql_connect($mysqllocation,$mysqlusername,$mysqlpassword); mysql_select_db($mysqldatabase, $connect); $result = mysql_query($query) or die(mysql_error()); $row = mysql_fetch_array($result) or die(mysql_error()); return $row; }}?>
I tried include_once vars in the functions itself and include vars in the function...
Now I've seen people using public vars... I don't get by the way... so am I calling my vars wrong because their just strings containing mysql data?
From what I understand using require halts the script causing a fatal error?
But when I comment it out I still get a fatal error.