Quote
Fatal error: Cannot redeclare getinfo() (previously declared in /home/gaptoco1/public_html/Space/forum/beta/includes/content/include.php:17) in /home/gaptoco1/public_html/Space/forum/beta/includes/content/include.php on line 23
But i only have getInfo() once?
<?
session_start();
/* Connect to MySQL */
$dbname = '**********';
$dbuser = '***********';
$dbpasswd = '******';
mysql_connect('*****',$dbuser,$dbpasswd);
mysql_select_db($dbname);
/* Define */
if(!isset($_SESSION['userid'])){
define('LOGGED_IN',false);
} else {
define('LOGGED_IN',true);
}
function getInfo($info,$uid=0){
if($uid==0){
$uid=$_SESSION['userid'];
}
$query = mysql_fetch_assoc(mysql_query("select * from forum_users where user_id='".$uid."'"));
return $query[$info];
}
function getRankName($rankId){
if($rankId==0){
return "Private";
}
$query = mysql_fetch_assoc(mysql_query("select * from forum_ranks where rank_id='".$rankId."'"));
return $query['rank_title'];
}
?>
Turns out it was caused by a double declaring of start_session();
This post has been edited by Jono20201: 25 January 2010 - 12:15 PM

New Topic/Question
This topic is locked




MultiQuote


|