/var/www/vhosts/m-auto.co/httpdocs/admin
Edit: /var/www/vhosts/m-auto.co/httpdocs/admin/offer_process.php (2115B)
prepare($sql);
$stmt->bind_param("sssids", $title, $description, $type, $car_id, $discount_price, $image_name);
} else {
// UPDATE
$sql = "UPDATE offers SET title=?, description=?, type=?, car_id=?, discount_price=?, image=? WHERE id=?";
$stmt = $conn->prepare($sql);
$stmt->bind_param("sssidsi", $title, $description, $type, $car_id, $discount_price, $image_name, $id);
}
if ($stmt->execute()) {
header("Location: offers.php?success=تم حفظ العرض بنجاح");
} else {
header("Location: offers.php?error=حدث خطأ: " . $stmt->error);
}
$stmt->close();
$conn->close();
} else {
header("Location: offers.php");
exit();
}
?>