0
Im使用以下代码来验证(很差,我知道)表单的$_POST[]
ed数据。如何将$auth
传递到新页面,以便我可以为用户打印? (short of using my-account.php?auth=You Must......)
使用header()从页面到页面传递变量;
if (!$_POST['supportarea'] || !$_POST['supportbody']) {
$auth = 'You must provide some information if we are ever to help you with your support ticket';
header('Location: ../pages/my-account.php');
}
谢谢。亚历克斯。
不要使用(!$ _ POST ['foo']),因为它会产生PHP错误。使用(!isset($ _ POST ['foo']))。 – FoneyOp 2011-05-24 16:55:16