eaglelegend Posted May 16, 2008 Share Posted May 16, 2008 I am trying to code my profile page, but something is wrong here, heres the error message: Parse error: syntax error, unexpected $end in /misc/39/000/171/334/2/user/web/eaglelegend.com/pro.php on line 64 code: <?php include("header.php"); if($_SESSION['ELv2']) { $sql = mysql_query("SELECT * FROM `members` WHERE `username`='{$_SESSION['ELv2']}'"); while($row = mysql_fetch_array($sql)) { extract($row); if($_SESSION['ELv2']!="") { $user = $_GET['user']; print "<p class=\"style1\">$user's Profile</p>"; $sqll = mysql_query("SELECT * FROM `members` WHERE `username`='$user'"); while($row = mysql_fetch_array($sqll)) { extract($row); $admin = mysql_query("SELECT * FROM `members` WHERE `username`='{$_SESSION['ELv2']}'"); while($adminr = mysql_fetch_array($admin)) { $l = $adminr["level"]; } if($l>999) { $freeze = "<a href=\"freeze.php?user=$user\">[f]</a>"; $del = "<a href=\"delete.php?id=$id\">[x]</a>"; } $img = getimagesize($image); if($image) { $w = $img[0]; $h = $img[1]; $image = "<img src=\"$image\" width=\"$w\" height=\"$h\" alt=\"$user\"><br />"; } if($profile) { $profile = "<br />$profile"; } if($location) { $location = "<br />Location: $location"; } if($email) { $email = "<br />Email: $email"; } if($website) { $website = "<br />Website: <a href=\"$website\">$website</a>"; } print $image . $location . $email . $website . $profile . "<br /><a href=\"mail.php?to=$user\">Send Msg</a>"; } } else { print "Please login"; } include("footer.php"); ?> Link to comment https://forums.phpfreaks.com/topic/105980-profile-error/ Share on other sites More sharing options...
jonsjava Posted May 16, 2008 Share Posted May 16, 2008 this is your syntax flow (I'm guessing you forgot to close something off) <?php include("header.php"); if($_SESSION['ELv2']) { $sql = mysql_query("SELECT * FROM `members` WHERE `username`='{$_SESSION['ELv2']}'"); while($row = mysql_fetch_array($sql)) { extract($row); if($_SESSION['ELv2']!="") { $user = $_GET['user']; print "<p class=\"style1\">$user's Profile</p>"; $sqll = mysql_query("SELECT * FROM `members` WHERE `username`='$user'"); while($row = mysql_fetch_array($sqll)) { extract($row); $admin = mysql_query("SELECT * FROM `members` WHERE `username`='{$_SESSION['ELv2']}'"); while($adminr = mysql_fetch_array($admin)) { $l = $adminr["level"]; } if($l>999) { $freeze = "<a href=\"freeze.php?user=$user\">[f]</a>"; $del = "<a href=\"delete.php?id=$id\">[x]</a>"; } $img = getimagesize($image); if($image) { $w = $img[0]; $h = $img[1]; $image = "<img src=\"$image\" width=\"$w\" height=\"$h\" alt=\"$user\"><br />"; } if($profile) { $profile = "<br />$profile"; } if($location) { $location = "<br />Location: $location"; } if($email) { $email = "<br />Email: $email"; } if($website) { $website = "<br />Website: <a href=\"$website\">$website</a>"; } print $image . $location . $email . $website . $profile . "<br /><a href=\"mail.php?to=$user\">Send Msg</a>"; } } else { print "Please login"; } } } include("footer.php"); ?> Link to comment https://forums.phpfreaks.com/topic/105980-profile-error/#findComment-543145 Share on other sites More sharing options...
eaglelegend Posted May 16, 2008 Author Share Posted May 16, 2008 thanks jonsjava!, heh now for somereason it shows in the edit profile but it dont on the profiles themselves... hmm... I am not sure whats up with that. however the great thing is it works for both mobiles and the actual internet pages... ah, I might know whay it dont work XD brb!! Link to comment https://forums.phpfreaks.com/topic/105980-profile-error/#findComment-543154 Share on other sites More sharing options...
eaglelegend Posted May 16, 2008 Author Share Posted May 16, 2008 its ok, it works! heh thanks all! Link to comment https://forums.phpfreaks.com/topic/105980-profile-error/#findComment-543155 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.