Editing HTML based on $_GET
<pre><code>&lt;?php
$g = $_GET['e'];
$t = "Title!";
$h = "";
$p = "";

function errorput($et,$eh,$ep) {
    $t = $et;
    $h = '&lt;h1&gt;'.$eh.'&lt;/h1&gt;';
    $p = '&lt;p&gt;'.$ep.'&lt;/p&gt;';
}

if ($g == "nodata") {
    errorput("Missing Something...", "Blank Field", "You left a box or few empty.");
} elseif ($g == "nopass") {
    errorput("Password Incorrect!", "Encrypted Hash Unmatched", "Your password is probably wrong.");
} else {
    errorput($t, "I have no idea.", "There was an error, but we don't know why.");
}
?&gt;
&lt;!DOCTYPE html&gt;
&lt;html&gt;
&lt;head&gt;
&lt;title&gt;&lt;?php echo $t ?&gt;&lt;/title&gt;
&lt;head&gt;
&lt;body&gt;
&lt;?php echo $h; echo $p; ?&gt;
&lt;/body&gt;
&lt;/html&gt;
</code></pre>

<p>So, it outputs html based on what it receives via GET.
Why doesn't it work?</p>
