include_once "includes/dbConnNew.php";
include_once "includes/loggedOn.php";
import_request_variables("gp", "");
//$_SESSION["sessionUserID"]= 22 ;
if($_REQUEST["theAction"] != "update"){
$SelectStr = "SELECT * from users where ID='" . $_SESSION["sessionUserID"] . "'";
$result = mysql_query($SelectStr)or die(mysql_error());
if($myrow=MySQL_fetch_array($result)){
$Birth_Date = $myrow["BirthDate"] ;
$Anniversary = $myrow["Anniv"] ;
}
}
if($_REQUEST["theAction"] == "update"){
$SQL1 = "select ID from users where Lower(Email) = '".strtolower($_POST[Email])."' ";
$result1 = mysql_query($SQL1) or die(mysql_error());
if($myrow1=MySQL_fetch_array($result1)){
if($_SESSION["sessionUserID"] != $myrow1["ID"]){
$dupEmail = "y";
header("Location: editProfile.php?dupEmail=y");
exit ;
}else
$F_SQL ="SELECT Family_User_Name FROM users where Family_User_Name='".trim($_POST[FamilyUserName])."' AND ID!=".$_SESSION["sessionUserID"];
$f_result = mysql_query($F_SQL) or die(mysql_error());
$f_row = mysql_fetch_assoc($f_result);
$user_family_name = $f_row['Family_User_Name'];
if(strlen($myrow1["Password"]<6 &&$myrow1["Family_User_Name"])){
$badLength = "y";
header("Location: editProfile.php?badLength=y");
exit ;
}
else if(!empty($user_family_name)){
$badUsername = "y";
header("Location: editProfile.php?badUsername=y");
exit ;
}
else{
$goahead="yes";
$user_id=$_SESSION["sessionUserID"];
}
}else{
$goahead="yes";
$user_id=$_SESSION["sessionUserID"];
}
if($goahead == "yes"){
$address = ereg_replace("'","´",$address);
$SQL2 = "UPDATE users SET Time_Zone = '$_POST[timeZone]', Country = '$_POST[country]',City = '$City', First_Name = '$FirstName', Last_Name = '$LastName', Email = '$Email', Family_User_Name = '$_POST[FamilyUserName]', Password ='$Password' ,address ='$address' ,State_Reside = '$State' ,Zip = '$zipcode' ,phone ='$phone' ,webSite = '$site' ,keep_private ='$noShare' WHERE ID = '" . $_SESSION["sessionUserID"]. "'";
$result2 = mysql_query($SQL2) or die(mysql_error());
$_SESSION["sessionFname"] = $FirstName;
$_SESSION["sessionLname"] = $LastName;
$_SESSION["sessionEmail"] = $Email;
header("Location: myProfile.php");
exit ;
}
}
//echo "
";print_r($myrow['FAMILY_USER_NAME']); exit;
?>
Edit My Profile
include 'beforeEndHead.php'; ?>
 |
 |
 |
 |
include "topSignIn.php"; ?> |
 |
include "NAV-GREEN.php" ;?>
 |
 |
|
|
|
|
include "bottomLocalSearch.php"; ?> |
 |
|
|
include "googAna.php"; ?>