<?php
 session_start
();
 if (
session_is_registered("valid_user"))
 {
include(
"../include/FunctionDB.php");
ConnectDB();
//  
 
$Path "../images"
    if ( isset(
$Img1) )
    if (
copy($Img1,"$Path/$Img1_name")) 
       {
            
unlink ($Img1);
            
$Img1 "$Path/$Img1_name";
       }
$DateBirth $_POST['mYear1']."-".$_POST['mMonth1']."-".$_POST['mDate1'];
$Datetype $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$sql " UPDATE  massege_db   SET      Orderlist='$Orderlist',Dental_code='$Dental_code',First_name='$First_name',Name='$Name',Lastname='$Lastname',Name_eng='$Name_eng',Lastname_eng=' $Lastname_eng',Sex='$Sex',DateBirth='$DateBirth',Datetype='$Datetype',Religion='$Religion',Address='$Address',Img1='$Img1',provinceId='$provinceId',Phone_1='$Phone_1',Phone_2='$Phone_2',StatusId='$StatusId',Email='$Email',Description_1='$Description_1',Description_2='$Description_2',Year_1='$Year_1',Flag='$Flag'   WHERE  massegeId ='$massegeId' ";
$result mysql_query($sql) or die("Update Error $sql".mysql_error());
 echo
"<meta http-equiv=\"refresh\" content=\"1;URL=massegeList.php\">\n";
echo
"<center><font face=\"Ms San serif\"size=\"5\" color=\"#FF0000\">Edit  Complete</font></center>";
CloseDB();
?>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>