Jump to content

Profile - error


eaglelegend

Recommended Posts

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

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

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.