![]() |
header
вообщем такая проблема.
есть скрипт <?php ob_start(); include_once "functions.php"; include_once "db_config.php"; $name = htmlspecialchars($_POST['name']); $city = htmlspecialchars($_POST['city']); $email = htmlspecialchars($_POST['email']); $url = htmlspecialchars($_POST['url']); $msg = htmlspecialchars($_POST['msg']); $time =mysql_query("SELECT NOW();"); $puttime = mysql_result($time,0); if(!$puttime) { $puttime= "0000 00 00 00:00:00"; } $add_query = "INSERT INTO guest VALUES(0,'$name','$city','$email','$url','$msg','$ puttime','show')"; if (!mysql_query($add_query)) { echo "cant write message"; } header ("Location : http://banderas/fuck/index.php"); exit; ?> в нем не работает header ("Location : http://banderas/fuck/index.php"); . как заставить его перейти ? |
<?php
ob_start(); include_once "functions.php"; include_once "db_config.php"; $name = htmlspecialchars($_POST['name']); $city = htmlspecialchars($_POST['city']); $email = htmlspecialchars($_POST['email']); $url = htmlspecialchars($_POST['url']); $msg = htmlspecialchars($_POST['msg']); $time =mysql_query("SELECT NOW();"); $puttime = mysql_result($time,0); if(!$puttime) { $puttime= "0000 00 00 00:00:00"; } $add_query = "INSERT INTO guest VALUES(0,'$name','$city','$email','$url','$msg','$ puttime','show')"; if (!mysql_query($add_query)) { echo "cant write message"; ob_flush(); die(); } header ("Location: http://google.ru"); ob_flush(); die(); ?> попробуй а вообще до header не должно быть никакого вывода |
все дело в пробеле
header("Location: http://banderas/fuck/index.php"); а не header("Location : http://banderas/fuck/index.php"); ну и жесть |
| Время: 10:43 |