/var/www/vhosts/m-auto.co/httpdocs/admin
Edit: /var/www/vhosts/m-auto.co/httpdocs/admin/news_process.php (2527B)
prepare("UPDATE news SET title = ?, content = ?, image = ?, video_type = ?, video_url = ?, video_file = ? WHERE id = ?");
$stmt->bind_param("ssssssi", $title, $content, $image, $video_type, $video_url, $video_file, $id);
} else {
$stmt = $conn->prepare("UPDATE news SET title = ?, content = ?, video_type = ?, video_url = ?, video_file = ? WHERE id = ?");
$stmt->bind_param("sssssi", $title, $content, $video_type, $video_url, $video_file, $id);
}
$stmt->execute();
} else {
// Insert new article
$stmt = $conn->prepare("INSERT INTO news (title, content, image, video_type, video_url, video_file) VALUES (?, ?, ?, ?, ?, ?)");
$stmt->bind_param("ssssss", $title, $content, $image, $video_type, $video_url, $video_file);
$stmt->execute();
}
header("Location: news.php");
exit;
}
?>