...

View Full Version : undefined variable



jarv
09-16-2011, 08:10 PM
Notice: Undefined variable: loggedin in D:\mypubspace.com\wwwroot\mobile\index.php on line 10




<?php include "config.php";
$loggedIn = (isset($_COOKIE['loggedin']) && $_COOKIE['loggedin'] == 'true')?true:false;
$query1 = "SELECT DISTINCT rsTown FROM pubs ORDER BY rsTown asc";
$result = mysql_query($query1);


$towns = mysql_query("SELECT DISTINCT RSTOWN, COUNT(PUBID) As PubCount FROM pubs GROUP BY RSTOWN ORDER BY RSTOWN ASC");
$counties = mysql_query("SELECT DISTINCT RSCOUNTY, COUNT(PUBID) As PubCount1 FROM pubs GROUP BY RSCOUNTY ORDER BY RSCOUNTY ASC");
if ($loggedin == 'true')
$locals = mysql_query("SELECT * FROM pubs INNER JOIN favepub_copy ON pubs.PUBID=favepub_copy.PUBID WHERE USERID='".$_SESSION['USERID']."' ORDER BY rsPubName asc");
?>




line 10:
if ($loggedin == 'true')

myfayt
09-16-2011, 08:17 PM
The variable isn't the same name, the I needs to be capital. Change to $loggedIn



EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum