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