> I have a site with all my movies and stuff stored in a database. And I
> have
> made a admin page where I can add, delete and update records. When I
> new
> records, I have made a listbox for the category (ex. action, comedy
> so
> I dont have to write it every time I add a new record. But when I push
> update button and the data thats stored in the database is printed its
> printed just in a textarea. I know its possible to list the data in a
> listbox, but how do I get the right category selected for the movie I
> choose?

<select name="whatever">
<option value="1" <?if($something==1) { echo "selected"; }
<option value="2" <?if($something==2) { echo "selected"; }

Put it into a function and the possible values into an array to make it

---John Holmes...

PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to