【发布时间】:2010-06-24 10:35:58
【问题描述】:
<div id="left-body-part-innerpage">
<h1 class="mainheading">Contact Us</h1>
<div id="contactus-right-div" class="content">
<?php session_start();
if( isset($_POST['button2']))
{
if( $_SESSION['security_code'] == $_POST['security_code'] && !empty($_SESSION['security_code'] ) )
{
$name = $_POST['name'];
// Insert you code for processing the form here, e.g emailing the submission, entering it into a database.
session_destroy();
header("Location: contactdb.php");
?>
我收到警告:session_start() [function.session-start]:无法发送会话缓存限制器 - 网站中的标头已发送(从网站开始输出)
警告:无法修改标头信息 - 标头已由网站中的(从网站开始的输出)发送
谁能帮帮我?
提前谢谢....
【问题讨论】:
-
考虑包含他的文件,而不是重定向到它。
-
会话警告呢?
-
只需将 header 函数放在任何 HTML 之前。