If anyone can help me with this I would be incredibly grateful...have spent days trying to figure this out. Here are the basics
server model: PHP (although if you know it in other server model that okay too...can translate)
database: mysql
I have a 2 page form. When the user fills out the info on page form he is directed to the 2nd page of the form. A session variable has been created in the 2nd form to hold all the data from the 1st page. When the 2nd page is submitted all the data (stored from page 1 and new from page 2) are sent to the database.
Here is the problem. On page 1, I have several form fields (like combo boxes) that need to work together. For example: I have a text field (name=phylum) in which investigators add new phylum names which are eventually sent to database field "phylum" of the same name. Next to that is a select box (name=newphylum) that has all the names that the investigors have previously entered and that are dynamically retrieved from the database field "phylum".
So when a researcher fills out page 1 of the form he/she can either add a new name or select an already existing name from the select box. But just one of these values can be sent to the database, not both.
QUESTION 1:
How can I say and where would I put something that basically says the following:
if the phylum text field is left EMPTY (i.e. they don´t add a new name) and they select instead from the select box, that it is the value from the select box and not the text box that gets sent to the database.
QUESTION 2:
How do I pass the statement from question 1 into the session variable on page 2 of my form?
I´m at my wits end with this....Please help if you can
Thanks
Jim
Madrid, Spain