Error: password does not match. Try again'; echo '

Try again

'; include "src/footer.php"; exit; } //If the name and the other fields are empty if($name=='' || $email='' || $password1='' || $password2='' || $date_of_birth= ''|| $place_of_birth= ''|| $info='' || $nationality='' ){ include "src/header.php"; include "src/mainmenu.php"; echo '

Error:You didn\'t fill the fields.Try again'; echo '

Try again

'; include "src/footer.php"; exit; } $email=$_SESSION['email']; $sql = "UPDATE users SET name='".mysql_real_escape_string($name)."', info= '".mysql_real_escape_string($info)."', password=".mysql_real_escape_string($password2)."' place_of_birth='".mysql_real_escape_string($place_of_birth)."', date_of_birth='".mysql_real_escape_string($date_of_birth)."', nationality='".mysql_real_escape_string($nationality)."' WHERE email ='$email'"; $retval = mysql_query($sql,$link); if (!$retval|| $retval==false) { include "src/header.php"; include "src/mainmenu.php"; die('Could not update data: ' . mysql_error()); echo '

Try again

'; include "src/footer.php"; mysql_close($link); exit; } else { echo "Updated data successfully\n"; //header('Location: private.php'); } mysql_close($link); } else { include("db.php"); $email=$_SESSION['email']; $run = mysql_query("select * from users where email='$email'") or die("Error!"); $read = mysql_fetch_assoc($run); ?>
Update Profile