Hi
at an error appears that says:-
Undefined variable: admin in e:\domains\p\puxton.co.uk\user\htdocs\index.php on line 38
the line says: if($admin == true)
print("<div class=\"adminlinkfront\"><a href=\"edit.php?item=news&id=1\">edit news headline</a></div>");
which I take to mean that if the variable admin is true print the next bit on the screen. The variable is set at the top:
<?php
session_start();
if(isset($_SESSION['loggedin'])){
if($_SESSION['loggedin'] == TRUE)
$admin = TRUE;
}
include("database.php");
$db = new Database();
$text = $db->query("SELECT content FROM news WHERE newsid=1",'cell');
?>
This bit has lost me because an enduser would not belogged in??? and I thought it said if the session is logged in then the variable admin is true? so why isit an undeclared variable??
Any help appreciated
thanks
Ian
at an error appears that says:-
Undefined variable: admin in e:\domains\p\puxton.co.uk\user\htdocs\index.php on line 38
the line says: if($admin == true)
print("<div class=\"adminlinkfront\"><a href=\"edit.php?item=news&id=1\">edit news headline</a></div>");
which I take to mean that if the variable admin is true print the next bit on the screen. The variable is set at the top:
<?php
session_start();
if(isset($_SESSION['loggedin'])){
if($_SESSION['loggedin'] == TRUE)
$admin = TRUE;
}
include("database.php");
$db = new Database();
$text = $db->query("SELECT content FROM news WHERE newsid=1",'cell');
?>
This bit has lost me because an enduser would not belogged in??? and I thought it said if the session is logged in then the variable admin is true? so why isit an undeclared variable??
Any help appreciated
thanks
Ian