hi i am trying to implement a feature on my site that will read the session and display the username that is currently logged on, however its not working well. this is what i have done:
//part where the user logs in, just to illustrate writing into the session
if (mysql_num_rows($result) == 1) {
// the username and password match,
// set the session
$SESSION['db_is_logged_in'] = true;
$SESSION['username'] = $username;
// part where i am trying to read and display the username
<?php
if (!isset($SESSION['db_is_logged_in'])
echo("<b>You are not Logged in!</b></p>"); // LINE24
else
echo("<b>You are logged in as ".$SESSION['username']."</b>");
?>
The error being displayed is:
Parse error: parse error, unexpected T_ECHO in W:\www\jokes\admin\cats.php on line 24