I have a php form with a few fields and one of the fields is a menu called category, where the user can select a category.
The initial value for the category is 'other'
also on my form is a preview button which takes the user to a new page where they can view all of their data before submitting it.
My problem is, when they move to this new page to view all of their data, I can pass in all of the new data to show them including the category they chose... however I dont know how to set the menu to display that category automatically. It always reverts back to the value 'Other' because I dont know how to set a dynamic initial value for it.
Incase im not being clear heres an example.
-Users fills out a form and chooses entertainment (with a value of 5) as the category
-they hit submit
-the value 5 is passed to the new page
-however when the submit form comes up entertainment is not selected as the category by default because I cant set the initial value of the menu to 5
is there any parameter or php code or anything on a menu to set the inital value dynamically. As far as I know it only lets you select a default initial value like this:
Code: Select all
<select name="Category" id="Category">
<option value="0">Animal / Nature</option>
<option value="1">Automotive</option>
<option value="2" selected>Other</option> // with this being the default init value
</select>thanks!