Page 1 of 1

Retaining values in combo boxes (HELP!)

Posted: Thu Apr 24, 2003 8:40 pm
by kewl_php
I have a registration page in my site and it uses php in checking the validity and completeness of entries in the form. Once the user has entered an invalid entry or skipped a required field, the page loads again retaining all his other previous entries except for the erroneous one.

Now a problem lies in retaining the values in combo boxes.

Code: Select all

<option <?php if($value==1) 
                        if($_REQUEST&#1111;campus]=="Campus1") 
                            echo "selected"; ?>>Campus1
$value indicates whether the form has reloaded already or not.
Am I doin' it right people? It ain't working! It returned an error:

Code: Select all

Notice: Use of undefined constant campus  - assumed 'campus' in .....
Anybody help me? Thanks a lot...

Posted: Thu Apr 24, 2003 9:00 pm
by volka