<?
session_start();
echo "Welcome ". $_SESSION['first_name'] ." ". $_SESSION['last_name'] ."!
You have made it to the members area!<br /><br />";
echo "Your user level is ". $_SESSION['user_level']." which enables
you access to the following areas: <br />";
if($_SESSION['user_level'] == 0);
{
echo "<p><p><br>";
$getnews = mysql_query("select * from news ORDER BY id DESC");
while($r=mysql_fetch_array($getnews)){
extract($r);
echo("<b>$title on $date<BR><BR>$news</b>");
}
?>
<br>As of right now there isn't anything here but there will be a place to change your password, and to post news, and maybe a messaging system for teacher to teacher or admin to teacher or teacher to admin. but i am skeptial about that because i can't write a script that big. But for right now you can <a href="logout.php">Logout</a><br> And I will tell you when this works. <a href="postnotes.php">Add Notes</a> for your kids to look at.
<p><br>You can also change your password here.<a href="checkpass.php">Change it!</a>
<?
}
if($_SESSION['user_level'] == 1){
<p><p><br> <?
$getnews = mysql_query("select * from news ORDER BY id DESC");
while($r=mysql_fetch_array($getnews)){
extract($r);
echo("<b>$title on $date<BR><BR>$news</b>");
}
?>
<br>As of right now there isn't anything here but there will be a place to change your password, and to post news, and maybe a messaging system for teacher to teacher or admin to teacher or teacher to admin. but i am skeptial about that because i can't write a script that big. But for right now you can <a href="logout.php">Logout</a><br><a href="postnotes.php">Add Notes</a> for your kids to look at.
<p><br>You can also change your password here.<a href="checkpass.php">Change it!</a>
<br>Access Admin panel <? echo "<a href=\"$sitepath/member/admin/\"> here</a>";
}
?>
I have that code.
and when I run it i get the error
Parse error: parse error, unexpected '<' in /home/vhosts/scn.xoopiter.com/member/sample.php on line 27
And is there a better form of echo where i don't need to escape the quotes. And i am sad to say i lost my orginal working code so i cannot say what i changed