芝麻web文件管理V1.00
';
}
else
{
echo 'Danger! Dealer Not Added. Try Again.
';
}
}
if(isset($_POST['edit']))
{
$edit_id = $_POST['edit_id'];
$name = mysqli_real_escape_string($cn,$_POST['name']);
$mobile = mysqli_real_escape_string($cn,$_POST['mobile']);
$email = mysqli_real_escape_string($cn,$_POST['email']);
$gst = $_POST['gst'];
$address = mysqli_real_escape_string($cn,$_POST['address']);
$sqlSubject = mysqli_query($cn, "update `tbl_dealer` set `name`='$name', `mobile`='$mobile', `email`='$email', `gst`='$gst', `address`='$address' where `id`='".$edit_id."'");
if ($sqlSubject){
echo 'Success! Dealer Update Successfully.
';
}
else
{
echo 'Danger! Dealer Not Update. Try Again.
';
}
}
if(isset($_GET['edit_id']))
{
$id = $_GET['edit_id'];
$sql = mysqli_query($cn, "select * from `tbl_dealer` where id='$id'");
$sqlData = mysqli_fetch_array($sql);
}
if(isset($_GET['delete_id']))
{
$id = $_GET['delete_id'];
$sql = mysqli_query($cn, "update `tbl_dealer` SET `status`=0 where id='$id'");
echo 'Danger! Dealer Deleted Successfully.
';
}
?>
Online Dealer List
S.No. |
Name |
Email |
Mobile No. |
Address |
Action |
|
|
|
|
|
|