Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/251.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Php 页面A到页面B-连接要识别为已登录的页面_Php_Mysql_Forms - Fatal编程技术网

Php 页面A到页面B-连接要识别为已登录的页面

Php 页面A到页面B-连接要识别为已登录的页面,php,mysql,forms,Php,Mysql,Forms,我已经创建了一些访问控制页面,只有在登录后才能查看这些页面。我必须创建另一个页面,其中包含一个表单,用户将在其中填写详细信息并提交表单。但我无法将A页连接到B页,因此用户仍在登录 我尝试将访问控制页面中使用的代码添加到具有表单的页面B。但随后页面显示内部错误500 我在访问控制页面上使用的代码是 <?PHP require_once("./include/membersite_config.php"); if(!$fgmembersite->CheckLogin()) {

我已经创建了一些访问控制页面,只有在登录后才能查看这些页面。我必须创建另一个页面,其中包含一个表单,用户将在其中填写详细信息并提交表单。但我无法将A页连接到B页,因此用户仍在登录

我尝试将访问控制页面中使用的代码添加到具有表单的页面B。但随后页面显示内部错误500

我在访问控制页面上使用的代码是

<?PHP
require_once("./include/membersite_config.php");

if(!$fgmembersite->CheckLogin())
{
    $fgmembersite->RedirectToURL("login.php");
    exit;
}
?>

当我尝试在B页上使用相同的表单提交时,它不起作用

有些东西是矛盾的

这是B页上的代码

<?PHP

require_once("./separate/include/fgcontactformuser.php");
require_once("./separate/include/captcha-creator.php");

$formproc = new FGContactForm();
$captcha = new FGCaptchaCreator('scaptcha');

$formproc->EnableCaptcha($captcha);

$formproc->AddRecipient('mail.com'); //<<---Put your email address here

$formproc->SetFormRandomKey('H04uLRJh4CY5sR4');

if(isset($_POST['submitted']))
{
   if($formproc->ProcessForm())
   {
        $formproc->RedirectToURL("PageB.php");
   }
}

?>


为什么存在冲突以及为什么冲突不起作用?

添加代码:ini\u set(“display\u errors”,1);到出现错误的页面。为什么不使用http cookies?它们很容易用php设置。还有,我支持迈克B说的话。请接受对您的问题的更多回答,因为这将使其他人更愿意回答您的新问题。请检查您的服务器日志,查看500错误的原因。如果有人能够演示代码以删除错误,我将非常高兴。我想将用户传递到PageB,并且仍然显示他已登录。肯定会有一些php冲突。让我试试@PhilCross的建议。