Keep input values after post
<p>I have a website that uses seperate files to process the PHP like the post form is on one page and when a user submits the form, it goes to contact_form.php then when the PHP has processed the form, it will redirect the user with this part of the code:</p>

<pre><code>// rest of code above

if($result)
{
    $_SESSION['SUCCESS'] = "Your message was posted";
    header("Location: viewtopic.php?id=" . $id . "&amp;mode=view");
}
else
{
    $_SESSION['ERROR'] = "Your message could not be posted";
    header("Location: viewtopic.php?id=" . $id . "&amp;mode=add");
}
</code></pre>

<p>Since the <code>else</code> part would return to the posting page and the values that were submitted would be empty in the input fields, I need them intact when an error has returned...</p>

<p>I wouldn't rely on JavaScript validation since users may have them disabled, so I have no idea would be the best method for me to use when returning with errors and the values are intact in the input fields.</p>
