Page 1 of 1

Form losing data for invalid captcha

Posted: Thu Jan 27, 2011 12:53 pm
by dt22
can anyone show any example to store the session value to a session variable?

Re: Form losing data for invalid captcha

Posted: Thu Jan 27, 2011 2:43 pm
by John Cartwright
<input id="security_code" name="security_code" type="text" />

to

Code: Select all

<input id="security_code" name="security_code" type="text" value="<?php echo isset($_POST['security_code']) ? htmlentities($_POST['security_code'], ENT_QUOTES) : ''; ?>" />
You basically need to repopulate the value attribute.