Note that there are some explanatory texts on larger screens.

plurals
  1. PORearrange my password recovery file so HTML output is below Header
    text
    copied!<p>I am slowly getting to grips with PHP, however struggle with breaking up a my if statements so my header functions work. I have done a few but they didn't involve as many conditions as my password recovery file does. Could somebody show me how I can go about doing this?</p> <pre><code>&lt;?php include ("storescripts/init.php"); logged_in_redirect(); include ("includes/overall/head.php");?&gt; &lt;?php include ("includes/overall/template_header.php");?&gt; &lt;div id="mainDivShort"&gt; &lt;h1&gt;Recover&lt;/h1&gt; &lt;div id="divBreak"&gt;&lt;/div&gt; &lt;?php include ("includes/overall/column_left.php");?&gt; &lt;div id="middleContent"&gt; &lt;?php if(isset($_GET['success']) === true &amp;&amp; empty($_GET['success']) === true){ ?&gt; &lt;p&gt;Thanks, we've emailed you.&lt;/p&gt; &lt;?php } else { $mode_allowed = array('mem_password'); if (isset($_GET['mode']) === true &amp;&amp; in_array($_GET['mode'], $mode_allowed) === true) { if(isset($_POST['mem_email']) === true &amp;&amp; empty($_POST['mem_email']) === false) { if (email_exists($_POST['mem_email']) === true) { recover($_GET['mode'], $_POST['mem_email']); header('Location: recover.php?success'); exit(); } else { echo '&lt;p&gt;Oops, we couldn\'t find that email in the system&lt;/p&gt;'; } } ?&gt; &lt;form action="" method="post"&gt; &lt;ul&gt; &lt;li&gt;Please enter your email address:&lt;br&gt; &lt;input type="text" name="mem_email"&gt; &lt;/li&gt; &lt;li&gt;&lt;input type="submit" value="Recover"&gt;&lt;/li&gt; &lt;/ul&gt; &lt;/form&gt; &lt;?php } else { header('Location: index.php'); exit(); } } ?&gt; &lt;/div&gt; &lt;?php include ("includes/overall/column_right.php");?&gt; &lt;/div&gt; &lt;?php include ("includes/overall/template_footer.php");?&gt; </code></pre> <p>The header statements need to be above my includes head.php as this includes HTML output. I have tried the buffering however this didn't work for me! Thank you!</p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload