35 lines
752 B
PHP
35 lines
752 B
PHP
<?php
|
|
define("PWD", getcwd()); session_start(); define("MYSQL_HOST", "10.0.0.108"); define("MYSQL_USER", "siliconpin"); define("MYSQL_DB", "siliconpin_bill"); define("MYSQL_PASS", "bijaynagar"); define("SHOP_ID", "119");
|
|
|
|
|
|
$ss = $_POST['productsids'];
|
|
var_dump($ss);
|
|
$productIDs = explode(",", $ss);
|
|
|
|
$link = new mysqli(MYSQL_HOST, MYSQL_USER, MYSQL_PASS, MYSQL_DB);
|
|
|
|
if ($link->connect_error) {
|
|
die("Connection failed: " . $link->connect_error);
|
|
}
|
|
|
|
foreach ($productIDs as $id) {
|
|
$query = "DELETE FROM `" . SHOP_ID . "_product` WHERE `id` = ?";
|
|
$stmt = $link->prepare($query);
|
|
$stmt->bind_param("i", $id);
|
|
$stmt->execute();
|
|
header("Location: ./view-product");
|
|
$stmt->close();
|
|
}
|
|
|
|
$link->close();
|
|
|
|
|
|
|
|
?>
|
|
|
|
|
|
|
|
|
|
<style>
|
|
|
|
</style>
|