Jump to content

[SOLVED] Parse error: syntax error - Please Help


Lamez

Recommended Posts

ok I am getting this error

 

Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' in /mounted-storage/home48c/sub007/sc33591-LWQU/www/login/members/profile/edit_profile.php on line 49

 

here is the link: http://lamezz.com/login/members/profile/edit_profile.php?change=password

 

here is my script

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../../../style/default.css"/>
<?php
include ("../../../style/include/title.php");
?>
</head>

<body>


 <div class="logo"><?php
include ("../../../style/include/header.php");
?></div>


    
     

       <div class="spacer"></div>

<?php
include ("../../../style/include/logged_menu_member.php");
?>

<div class="box">
<center><font size="3">
<?php
$username = $_COOKIE['loggedin'];
if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href=../login.php>click here</a> to login.");
echo "<b>$username</b>'s Profile";
?>
</font></center></div>

<div class="box"><font size="3">
<?php
$getlink = $_GET["change"];


if ($getlink == "requestUsername") {
echo "Nope";
}
elseif ($getlink == "personalDetail") {
echo "Not Here Yet";
}
elseif ($getlink == "password") {
echo "(<form action="update.php" method="post" ><p><u><b>Change your password</b></u><br /></p> //LINE 49 IS HERE!!
  
    <center><p> Old Password:<br />
    <input type="password" name="oldpass" />
<br />
    <br />
New Password: <br />
<input type="password" name="newpass" />
<br />  
<br />
  
  </p>    <p>
      <input type="submit" name="Submit" value="Submit" />
</p></center>)";
}
else {
echo "Error";
}
?>
</font></div>
<?php
include ("../../../style/include/footer.php");
?>
</body>
</html>

 

Please Help, Thanks Guys!

Try this:

 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<link rel="stylesheet" type="text/css" href="../../../style/default.css"/>
<?php
include ("../../../style/include/title.php");
?>
</head>

<body>


 <div class="logo"><?php
include ("../../../style/include/header.php");
?></div>


       <div class="spacer"></div>

<?php
include ("../../../style/include/logged_menu_member.php");
?>

<div class="box">
<center><font size="3">
<?php
$username = $_COOKIE['loggedin'];
if (!isset($_COOKIE['loggedin'])) die("You are not logged in, <a href=../login.php>click here</a> to login.");
echo "<b>$username</b>'s Profile";
?>
</font></center></div>

<div class="box"><font size="3">
<?php
$getlink = $_GET["change"];


if ($getlink == "requestUsername") {
echo "Nope";
}
elseif ($getlink == "personalDetail") {
echo "Not Here Yet";
}
elseif ($getlink == "password") {
print<<<HERE
<form action="update.php" method="post" ><p><u><b>Change your password</b></u><br /></p> //LINE 49 IS HERE!!
  
    <center><p> Old Password:<br />
    <input type="password" name="oldpass" />
<br />
    <br />
New Password: <br />
<input type="password" name="newpass" />
<br />  
<br />
  
  </p>    <p>
      <input type="submit" name="Submit" value="Submit" />
</p></center>
HERE;

}
else {
echo "Error";
}
?>
</font></div>
<?php
include ("../../../style/include/footer.php");
?>
</body>
</html>

the problem is

echo "(<form action="update.php" method="post" ><p><u><b>Change your password</b></u><br /></p> //LINE 49 IS HERE!!

it think that you are ending the line because your are ending the quote change it to

echo "(<form action='update.php' method='post' ><p><u><b>Change your password</b></u><br /></p> //LINE 49 IS HERE!!

there is probably more places in your code where you have this problem

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.