> > Hi All
> > I have a fully functional db site which uses 2 sqls and 1 page to give
> > visitors info they need.
> >
> > That works fine, but some users have remarked that it would be nice that
> the
> > selected item from our drop down list stays shown when the page gives
> > info instead of going back to the top of the list.
> >
> > http://www.angelettes.co.uk/dates/index.php3 is the url in action and
> > choosing different towns will show you what I mean.
> >
> > Its not the end of the world, as our visitors have said, but would be
> nice.
> >
> > Any help is full appreciated.
> >
> > Dave C

Check if the variable has been posted and echo the value like below on the
first option line is how I do it.  This will put two options with the same
value in the select box and the first will be selected.

<? if(isset($HTTP_POST_VARS["variable"])) echo '<option
selected>'.$HTTP_POST_VARS["variable"].'</option>'; ?>

or add to each option: if ($HTTP_POST_VARS["variable"] == 'option
value')echo 'selected';

<option value="value" <?if ($HTTP_POST_VARS["variable"] == 'option
value')echo 'selected'; ?>>some text</option>


PHP Database Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to