<?PHP
require('../mysql.php');
#region Pārbaude, vai ieraksts eksistē
if(!isset($_GET['id'])){
header("Location: listposts.php");
exit;
}
$id = intval($_GET['id']);
$query = mysql_query("SELECT * FROM `posts` WHERE `id`='$id' LIMIT 1;");
if(mysql_num_rows($query)==0){
header("Location: listposts.php");
exit;
}
Комментариев нет:
Отправить комментарий