Viewing file: EditMan.php (1.24 KB) -rw-r--r-- Select action/file-type: (+) | (+) | (+) | Code (+) | Session (+) | (+) | SDB (+) | (+) | (+) | (+) | (+) | (+) |
<?php
session_start();
if (session_is_registered("valid_user"))
{
include("../../include/FunctionDB.php");
ConnectDB();
//
$Path = "../../Man_pic";
if ( isset($Img1) )
if (copy($Img1,"$Path/$Img1_name"))
{
unlink ($Img1);
$Img1 = "$Path/$Img1_name";
}
$Date_buy = $_POST['mYear']."-".$_POST['mMonth']."-".$_POST['mDate'];
$Date_year = $_POST['mYear1']."-".$_POST['mMonth1']."-".$_POST['mDate1'];
$sql = " UPDATE manament_tb SET Acc_code='$Acc_code',Teacher_code='$Teacher_code',Student_id='$Student_id',Acc_name='$Acc_name',Acc_code='$Acc_code',Store='$Store',Fix_History='$Fix_History',Contact='$Contact',Date_buy='$Date_buy',Date_year='$Date_year',Img1='$Img1',Price='$Price',Fix_budget='$Fix_budget',Status='$Status',Status_1='$Status_1',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:ManList.php");
CloseDB();
?>
<?php
}
else
{
echo"<meta http-equiv=\"refresh\" content=\"3;URL=../../login.php\">\n";
echo"Please Login ";
}
?>
|