Hi, I have this code that was working fine yesterday and now it comes up with a parse error:
Parse error: parse error in /home/hph/public_html/b/mjb3000/members/main.php on line 218
//code
It says </html> is the problem??
Any Ideas
Thnx
Martin
Parse error: parse error in /home/hph/public_html/b/mjb3000/members/main.php on line 218
//code
Code:
<?php
session_start();
$IsMember = false;
if(isset($_SESSION['username'])){
$DB = mysql_connect("$host", "$user", "$pass");
mysql_select_db("$db", $DB);
$query = mysql_query("SELECT * FROM members WHERE username = '".$_SESSION['username']."'");
$result = mysql_fetch_row($query);
if($result){
$IsMember = true;
}
}
$conn=@mysql_connect("$host", "$user", "$pass")
or die("Could not connect");
#select the specified database
$rs = @mysql_select_db("$db", $conn)
or die("Could not select database");
#create the query
$query = mysql_query("SELECT * FROM members WHERE username = '".$_SESSION['username']."'");
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<link href="../site.css" rel="stylesheet" type="text/css">
</head>
<body topmargin="0" leftmargin="0">
<?php
while ($row = mysql_fetch_array($query) )
{
?>
<table width="500" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td width="500" height="19" valign="top" class="site">
<div align="center">
<?php echo("Welcome ".$row["username"]." Your user level is ".$row["rights"]); ?>
</div></td>
</tr>
<tr>
<td height="128" valign="top" class="site">
<div align="center"><br><b><a href="../logout.php" target="content">Logout</a></b><br><br>
<u><strong>.:Control Panel:.</strong></u><br><br>
<?php
$num = $row["rights"];
switch($num)
{
case 1 : echo("Case 1 code "); break;
case 2 : echo("Case 2 code
"); break;
case 3 : echo("Case 3 code
"); break;
<u><b>.:Your Control Panel:.</b></u>
<br>Change Password
<br>Change Change Email Address
"); break;
}
?>
</div></td>
</tr>
</table>
</body>
</html> <-- problem line!!
It says </html> is the problem??
Any Ideas
Thnx
Martin