i have a members login page that allows a member to login and view their details. I want to give the members an option to update their details as well, however it is not doing so.The viewdetails.php calls updatemembers.php to update member details and their session values. The following is the code for updatemember.php:
<?
session_start();
?>
<?
$username = $SESSION['username'];
$password = $SESSION['password'];
//$password2 = $SESSION['password'];
$fname = $SESSION['fname'];
$lname = $SESSION['lname'];
$street = $SESSION['street'];
$city = $SESSION['city'];
$county = $SESSION['county'];
$email = $_SESSION['email'];
include "db_connection.php";
$connect = db_connect();
if ($connect)
{
$query = "UPDATE member SET password = '" & $password & "', fname = '" & $fname & "', lname = '" & $lname & "', street = '" & $street & "', city = '" & $city & "' , county = '" & $county & "', email = '" & $email & "' WHERE username = '" & $username & "'"
//$result sets up theconnection query
$result = mysql_query($query,$connect);
if(mysql_num_rows($result))
{
$_SESSION['username'] = $username;
$_SESSION['password'] = $password;
$_SESSION['fname'] = $fname;
$_SESSION['lname'] = $lname;
$_SESSION['street'] = $street;
$_SESSION['city'] = $city;
$_SESSION['county'] = $county;
$_SESSION['email'] = $email;
include success.php;
}
else
{
include "invaliddetails.html";
}
}
?>
I am getting the following error:
Parse error: parse error in c:\opensa\apache\htdocs\hbc\updatemember.php on line 22