Retaining values in combo boxes (HELP!)

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
kewl_php
Forum Newbie
Posts: 3
Joined: Sat Apr 05, 2003 2:30 am

Retaining values in combo boxes (HELP!)

Post 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...
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

Post Reply