芝麻web文件管理V1.00
';
}
else
{
echo 'Danger! Designation Not Exists.
';
}
}
else
{
echo 'Danger! This Designation Already Exists.
';
}
}
if(isset($_POST['edit']))
{
$id = $_POST['id'];
$name = $_POST['name'];
$sql = mysqli_query($cn, "select * from `tbl_designation` where id='$id'");
$sqlData = mysqli_fetch_array($sql);
$sqlSubject = mysqli_query ($cn,"update `tbl_designation` SET name='$name' where `id`='$id'");
if($sqlSubject)
{
echo 'Success! Designation Update Successfully.
';
}
else
{
echo 'Warning! Designation Updated try again.
';
}
}
if(isset($_GET['edit_id']))
{
$id = $_GET['edit_id'];
$sql = mysqli_query($cn, "select * from `tbl_designation` where id='$id'");
$sqlData = mysqli_fetch_array ($sql);
}
if(isset($_GET['delete_id']))
{
$id = $_GET['delete_id'];
$sql = mysqli_query($cn, "update `tbl_designation` SET `status`=0 where id='$id'");
if($sql)
{
echo 'Success! Designation Deleted Successfully.
';
}
else
{
echo "error: " . $sql . "
" . mysqli_error($conn);
}
}
?>
Designation Master