Parse error: parse error in C:\wamp\www\ForumPro\index.php on line 32
and in my phpdesigner: Unexpected T_ELSE line 32
Below is my code:
<?php
session_start();
include "./global.php"
?>
<html>
<head>
<title>ForumPro Index Page</title>
<link rel=StyleSheet href="style.css" type="text/css">
</head>
<body>
<center>
<div id="holder">
<div id="userInfo">
<?php
if(isset($_SESSION['uid']))
{
$sql = "SELECT username FROM `users` WHERE `id`='".$_SESSION['uid']."'";
$result = mysql_query($sql) or die(mysql_error());
if(mysql_num_rows($res) == 0)
{
session_destroy();
echo "Please <a href=\"./login.php\">login</a>, or <a href=\"./register.php\">register</a>.\n";
}
else {
$row = mysql_fetch_assoc($res);
echo "Welcome back, <a href=\"./index.php?act=profile&id=".$row['id']."\">".$row['username']."</a>\n";
}
else {
echo "Please <a href=\"./login.php\">login</a>, or <a href=\"./register.php\">register</a>.\n"
}
}
?>
</div>
<?php
?>
</div>
</center>
</body>
</html>
Any help would be GREATLY appreciated.


Sign In
Create Account


Back to top










