<?php
 session_start
();
 if (
session_is_registered("valid_user"))
 {
include(
"../include/FunctionDB.php");
ConnectDB();
//  
 
$Path "../Acc_pic"
    if ( isset(
$Img1) )
    if (
copy($Img1,"$Path/$Img1_name")) 
       {
            
unlink ($Img1);
            
$Img1 "$Path/$Img1_name";
       }
$Date_buy $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$sql " UPDATE accessories_tb SET  Acc_code='$Acc_code',Faculty_code='$Faculty_code',Acc_name='$Acc_name',Acc_type_code='$Acc_type_code',Store='$Store',Fix_History='$Fix_History',Contact='$Contact',Date_buy='$Date_buy',Img1='$Img1',Price='$Price',Fix_budget='$Fix_budget',Status='$Status',Statistic='$Statistic',Description='$Description'  WHERE code ='$code' ";
$result mysql_query($sql) or die("Update Error $sql".mysql_error());
//echo "<center>";
//echo"<font face=\"Ms san serif\"size=\"4\"><font color=\"0000FF\">$Fname</font>' Edit Complete </font></center>";
header("Location:EditAccList.php?Faculty_code=$Faculty_code");            
CloseDB();
?>
<?php 
    
}
else
{
       echo
"<meta http-equiv=\"refresh\" content=\"3;URL=../login.php\">\n";
       echo
"Please Login ";
}
?>