Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/php/231.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 “如果”发言和会议_Php_If Statement - Fatal编程技术网

Php “如果”发言和会议

Php “如果”发言和会议,php,if-statement,Php,If Statement,我有一个表单正在将会话发回我的索引页。基于这些会话,我使用echo从结果中加载一个模式窗口。我一直有500个错误。我不明白为什么 if($_SESSION["submitemail"] == "fail"){ echo "<script type='text/javascript'> $(window).load(function(){ $('#betaalert').modal('show');

我有一个表单正在将会话发回我的索引页。基于这些会话,我使用echo从结果中加载一个模式窗口。我一直有500个错误。我不明白为什么

if($_SESSION["submitemail"] == "fail"){

    echo
        "<script type='text/javascript'>
            $(window).load(function(){
                $('#betaalert').modal('show');
            });
        </script>


        <div class='modal fade' role='dialog' id='formerror'>
          <div class='modal-dialog'>

            <!-- Modal content-->
            <div class='modal-content'>
              <div class='modal-header'>
                <button type='button' class='close' data-dismiss='modal'>&times;</button>
                <h4 class='modal-title'>Could not send message...</h4>
              </div>
              <div class='modal-body'>
                <?
                echo '<p>We are very sorry, but there were error(s) found with the form you submitted.</p>';
                echo '<p>These errors appear below.</p><br /><br />';
                echo $_SESSION['errormessage'].'<br /><br />';
                echo '<p>Please go back and fix these errors.</p><br /><br />';
                ?>
              </div>
              <div class='modal-footer'>
                <a href='#' class='btn btn-primary' data-dismiss='modal'>Close</a>
              </div>
            </div>

          </div>
        </div>";

}

else if($_SESSION["submitemail"] == "success"){

    echo
        "<script type='text/javascript'>
            $(window).load(function(){
                $('#betaalert').modal('show');
            });
        </script>

        <!-- Modal -->
        <div class='modal fade' role='dialog' id='formsent'>
          <div class='modal-dialog'>

            <!-- Modal content-->
            <div class='modal-content'>
              <div class='modal-header'>
                <button type='button' class='close' data-dismiss='modal'>&times;</button>
                <h4 class='modal-title'>Thank You <? echo $_POST['first_name']; ?> <? echo $_POST['last_name']; ?>!</h4>
              </div>
              <div class='modal-body'>
                <?
                echo '<p>We appreciate your business and will be contacting you as soon as possible. Please allow 48 hours for us to process your request before sending another. Thank you!/p>';
                ?>
              </div>
              <div class='modal-footer'>
                <a href='#' class='btn btn-primary' data-dismiss='modal'>Close</a>
              </div>
            </div>

          </div>
        </div>";

}

else {

    echo
        "<script type='text/javascript'>
            $(window).load(function(){
                $('#betaalert').modal('show');
            });
        </script>

        <!-- Modal -->
        <div class='modal fade' role='dialog' id='betaalert'>
          <div class='modal-dialog'>

            <!-- Modal content-->
            <div class='modal-content'>
              <div class='modal-header'>
                <button type='button' class='close' data-dismiss='modal'>&times;</button>
                <h4 class='modal-title'>ANNOUNCEMENT!</h4>
              </div>
              <div class='modal-body'>
                <p>However we are pleased to announce that our beta testing program is open to all ambulance companies interested. If you are interested use the contact form on the bottom of this page to send us a message with your contact information and we will get you started with testing ASAP!</p>
              </div>
              <div class='modal-footer'>
                <a href='#' class='btn btn-primary' data-dismiss='modal'>Close</a>
              </div>
            </div>

          </div>
        </div>";

}

没关系,我知道了!谢谢你,以后我一定会发布更多信息。

我想500个错误在浏览器端-服务器端是什么?也许你应该打开错误报告,看看到底是什么问题,然后把它贴在这里?这不是完整的php文件。至少你会发布完整的php页面来找出哪里出了问题。。