
22.02.2009, 00:37
|
|
Постоянный
Регистрация: 29.09.2008
Сообщений: 553
Провел на форуме: 2584134
Репутация:
519
|
|
Сообщение от [dei]
после mysql_query
PHP код:
if(!mysql_num_rows($result)) header('Location: xz.php');
Втисал:
PHP код:
<?
error_reporting(0);
include"config.php";
$id=$_GET['id'];
if($id) {
echo $news;
$query = "SELECT * FROM news where `id`='".mysql_escape_string($id)."'";$result = mysql_query($query); if(!mysql_num_rows($result)) header('Location: index.php');
while ($row = mysql_fetch_array($result)) :
цикл...
endwhile;
}
?>
только оно чет не перекидует=(
ввожу : http://localhost/news.php?id=23'
и бестолку 
|
|
|