can anyone please tell me how to make the choice the user selected in the combo box be selected when the validation page redirects to the form again ?
One way is to do it like this:
<select name="foo">
<option value="1"<?php if ($_POST['foo'] == '1') { echo ' selected="selected"'; } ?>>Foo</option>
<option value="2"<?php if ($_POST['foo'] == '2') { echo ' selected="selected"'; } ?>>Bar</option>
</select>
Another option is to use something like PEAR::HTML_QuickForm, which can do the validation for you: <http://pear.php.net/package/HTML_QuickForm>
-- Ben Ramsey Zend Certified Engineer http://benramsey.com
--------------------------------------------------- Atlanta PHP - http://www.atlphp.org/ The Southeast's premier PHP community. ---------------------------------------------------
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php