session_start();
require 'connect.php';
if (isset($_GET['product_id'])) {
$param = $_GET['product_id'];
$stmt = $conn->prepare("SELECT * FROM products WHERE product_id = ?");
$stmt->bind_param('i', $param);
$stmt->execute();
$result = $stmt->get_result();
if($result->num_rows > 0) {
$row = $result->fetch_assoc();
//foreach ($row as $column => $value) {
//echo htmlspecialchars($column) . ": " . htmlspecialchars($value) . "
";
//}
$product_id = $row['product_id'];
$product_name = $row['name'];
$product_price = $row['price'];
$product_discount = $row['discount'];
$product_inStock = $row['in_stock'];
$product_category = $row['category'];
$product_description = $row['description'];
if($row['image1'] != null) {
$first_image = basename(strrchr($row['image1'], '/'));
$first_image = str_replace(array("'"), '', $first_image);
}
if($row['image2'] != null) {
$second_image = basename(strrchr($row['image2'], '/'));
$second_image = str_replace(array("'"), '', $second_image);
}
if($row['image3'] != null) {
$third_image = basename(strrchr($row['image3'], '/'));
$third_image = str_replace(array("'"), '', $third_image);
}
if($row['image4'] != null) {
$fourth_image = basename(strrchr($row['image4'], '/'));
$fourth_image = str_replace(array("'"), '', $fourth_image);
}
$brand = $row['brand'];
$series = $row['series'];
$model_number = $row['model_number'];
$weight = $row['weight'];
$dimensions = $row['dimensions'];
$color = $row['color'];
$manufactuer = $row['manufactuer'];
$origin = $row['origin'];
$firstDate = $row['firstDate'];
$discountAmount = $product_price * ($product_discount / 100);
$newPrice = $product_price - $discountAmount;
?>
Home > Products > >
На залиха
'; } ?>Delivery:
Free standard shipping on orders over $35 before tax, plus free returns.
TYPE
HOW LONG
HOW MUCH
Standard delivery
1-4 business days
$4.50
Express delivery
1 business day
$10.00
Pick up in store
1-3 business days
Free
'.$column.' | '; echo ''.$value.' | '; echo '
---|