Post action
Thanks Jason,
The main reason I use a different page is because I have not figured out how to test the captcha code and show an error on the same page (pretty much the same as your contact form for WebAssist).
Form code for captcha code is:
<tr valign="baseline">
<td align="right" nowrap="nowrap" class="InputTables"><p><img src="/securimage/securimage_show.php?sid=<?php echo md5(time()) ?>" alt="captcha" align="left" id="siimage" style="padding-right: 5px; border: 0" /><br />
<!-- pass a session id to the query string of the script to prevent ie caching -->
</p>
<p><a tabindex="-1" style="border-style: none" href="#" title="Refresh Image" onclick="document.getElementById('siimage').src = '/securimage/securimage_show.php?sid=' + Math.random(); return false"></a></p></td>
<td> <input type="text" name="captcha_code" size="10" maxlength="6" /></td>
</tr>
Error check code is:
include_once $_SERVER['DOCUMENT_ROOT'] . '/securimage/securimage.php';
$securimage = new Securimage();
if ($securimage->check($_POST['captcha_code']) == true) {
// capthca entered correctly
WA_DFP_SetupUploadStatusStruct("WA_UploadResult1");
.
.
.
else {
print '<p align="center" style="color: #DD0000; font-weight: bold;">Incorrect verification code</p>';
print '<p align="center"><a href="javascript:history.go(-1);">Go back and try again</a></p>';
}
?>