When i delete my items from my cart this error shows;
Warning: mysqli_query() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\FinalsActivity1\delete.php on line 5
Warning: mysqli_error() expects parameter 1 to be mysqli, string given in C:\xampp\htdocs\FinalsActivity1\delete.php on line 5
**CODES
require('header.php');
$itemsql = "SELECT * FROM orderitems WHERE id = ". $_GET['id'] . ";";
$itemres = mysqli_query($dbdatabase, $itemsql) or die(mysqli_error($itemsql));
$numrows = mysqli_num_rows($itemres);
if($numrows == 0) {
header("Location: showcart.php");
}
$itemrow = mysqli_fetch_assoc($itemres);
$prodsql = "SELECT price FROM products WHERE id = " . $itemrow['product_id'] . ";";
$prodres = mysqli_query($prodsql)or die(mysqli_error());;
$prodrow = mysqli_fetch_assoc($prodres);
Aucun commentaire:
Enregistrer un commentaire