Thanks in advance for any suggestions on the following:
I've created a php-page to add works from composers to CDs. It's a combination of two forms and looks like this:
Composer : [drop down list] : Select
Some blank space
Title : [drop down list]
Track number : [empty field]
Work : [drop down list]
+ some other fields
After selecting a name in the first block (posting to $_SERVER["PHP_SELF"]) I stay on the same page and that name is shown in the blank space in between and the drop down lists are populated with only CD titles and works of the selected composer.
I can then select from the lists and enter other data in the other fields. Hitting the process button posts the data from the second block to another page which will eventually send everything to a table in a MySQL database.
After that I send myself back to the first page with header("Location: the_first_page.php")
So far so good, but upon returning I would like the composer, title and work to be preselected. Now I'm sent to a blank page and have to start from scratch. I think I've seen some solution involving testing $_POST['something'] against <option value> in a drop down list but I can't seem to make that work. My question is: is there a way to send $_POST['Title'] and $_POST['Work'] back to the first page somehow? Or is it better to split the two forms over seperate pages?
All help is welcome.