English 中文(简体)
PHP 负责人在使用表格时不重新定位
原标题:PHP header not redirecting when using forms

I m 采用PHP文字进行认证。 我最初在2007年写过这一法典,但现在它刚刚停止了工作,我是想说明原因。

该法典:

<?php
$error_msg =   ;

// Only Validate Form when it is submitted
if (isset($formSubmit)) {
   if (!isset($_SESSION["First_Name"])) {
     $get_mbr_id = urlencode ($_POST["GetMbrID"]);
     $_SESSION["MemberID"] = $get_mbr_id;
     }

   if (!headers_sent()) {
     header ("Location: mywebsite.com");
     exit (0);
     }
}

if (isset($formExit)) {
  if (!headers_sent()) {
    header ( Location: mywebsiteexit.com );
    exit (0);
    }
}
?>
<html><head></head><body>
<form name="select_action" method="POST" action="select_action">
<br>
<center>
<input type="submit" name="formSubmit" value="Next">
<input type="reset" name="fieldReset" value="Reset">
<input type="submit" name="formExit" value="Cancel">
</center>
</form></body></html>

如果采用超文本格式代码,则由主管直接进行t工作。

然而,如果我删除了“超文本”代码,将“编码”改为“密码”(如(前文本),则标题改为“代码”。

我可以推测导致<代码>(<>header(<>>/code>)间接不发生的形式代码。

感谢任何帮助!

最佳回答

你们必须核对“POST超全球”美元中的员额数据。 登记册——全球已经失效。

if (isset($_POST[ formSubmit ])) {
//etc.
问题回答

Make 100% dure there isn t a blank line at the top before the





相关问题
Brute-force/DoS prevention in PHP [closed]

I am trying to write a script to prevent brute-force login attempts in a website I m building. The logic goes something like this: User sends login information. Check if username and password is ...

please can anyone check this while loop and if condition

<?php $con=mysql_connect("localhost","mts","mts"); if(!con) { die( unable to connect . mysql_error()); } mysql_select_db("mts",$con); /* date_default_timezone_set ("Asia/Calcutta"); $date = ...

定值美元

如何确认来自正确来源的数字。

Generating a drop down list of timezones with PHP

Most sites need some way to show the dates on the site in the users preferred timezone. Below are two lists that I found and then one method using the built in PHP DateTime class in PHP 5. I need ...

Text as watermarking in PHP

I want to create text as a watermark for an image. the water mark should have the following properties front: Impact color: white opacity: 31% Font style: regular, bold Bevel and Emboss size: 30 ...

How does php cast boolean variables?

How does php cast boolean variables? I was trying to save a boolean value to an array: $result["Users"]["is_login"] = true; but when I use debug the is_login value is blank. and when I do ...

热门标签