表单未处理,页面立即重定向

时间:2012-02-24 02:22:52

标签: php forms redirect

我只需要一个现实检查。此页面立即重定向到HTTP_HOST,无需下载数据或处理表单。这曾经是一次工作。我打破了一些东西,但我对它视而不见。 我正在使用具有1个值对的查询来访问该页面,如下所示:http://Nitrofill.biz/tr/Nitrofill_Presentation?num=EV4ghF8p3

有人能帮助我发现问题吗?

<?php session_start();
require_once('Connect.php') ;
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><title>Nitrofill Document</title>

<?php

$sn=$_GET['num'];
echo $sn;

mysql_connect($hostname,$username, $password) OR die('Unable to connect to database! Please try again later.');
mysql_select_db($dbname);
 $selectSQL = "select * from `Presentations` where `serialnum` ='" . $sn ."'" ;

$result = mysql_query($selectSQL) or die(mysql_error());
$row = mysql_fetch_array($result,  MYSQL_BOTH);
$thedoc = urldecode($row['docurl']);
$therecip=urldecode($row['recipient']);
$thetracker=urldecode($row['tracker']);
$lastacc=urldecode($row['last_accessed']);

?>
</head>
<body>

<form id="notice" action="http://m3sglobal.com/gdform.php" method="post"> 
<input  name="subject" value="<?php echo $therecip . " has viewed the document you sent them.";?> " /> 
<input type="hidden" name="redirect" value="<?php echo $thedoc ; ?>"/>
<label>Email:</label><input type="text" name="email" value="<?php echo $thetracker ; ?>"/>
<label>Comments:</label><textarea name="comments" cols="40" rows="5">
Document Viewed:<?php echo $thedoc ; ?>

When Accessed:<?php echo $lastacc ; ?>
</textarea>
<input type="submit" name="submit"/>
</form>
</body>

</html>

1 个答案:

答案 0 :(得分:1)

您在发布的链接中遗漏了.php。它必须是

http://nitrofill.biz/tr/Nitrofill_Presentation.php?num=EV4ghF8p3