/var/www/vhosts/m-auto.co/httpdocs/admin
Edit: /var/www/vhosts/m-auto.co/httpdocs/admin/brand_form.php (2369B)
'', 'name' => '', 'logo' => ''];
$page_title = "إضافة ماركة جديدة";
if (isset($_GET['id'])) {
$brand_id = $_GET['id'];
$stmt = $conn->prepare("SELECT * FROM brands WHERE id = ?");
$stmt->bind_param("i", $brand_id);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows === 1) {
$brand = $result->fetch_assoc();
$page_title = "تعديل الماركة";
} else {
header("Location: brands.php?error=Brand not found");
exit();
}
$stmt->close();
}
?>
= $page_title ?>