Page 1 of 1

refreshing help script

Posted: Fri Sep 30, 2005 7:42 pm
by Smackie
I need help i am making a form for a friend thats has a shirt, logo, and other stuff kind of business and he wanted me to make a contact form for him and well i made a dropdown menu for it and i want it where they click on shirts it will refresh and a new dropdown menu will show up here is the script so far (its right after the drop down menu and its php)

Code: Select all

if (isset($_POST['shirt'])
 {
<select name="dropdown" class="dropdown">
<option>-Select One-</option>
<option value="tshirts">Large</option>
<option value="business">X-Large</option>
<option value="cards">XX-Large</option>
<option value="flyers">XXX-Large</option>
</select>
}
can someone help me please

Thank you
Smackie

Posted: Sat Oct 01, 2005 1:30 am
by n00b Saibot
can be achieved in two ways - first is fetch all the records from db, store it in arrays and dynamically change the options when select changes using js, second is to submit the form every time select changes and populate the options using php. Your choice...

Posted: Sat Oct 01, 2005 5:20 am
by pilau
The second option, btw, is more common used. At least in the websites where I hang around.

Posted: Sun Oct 02, 2005 11:25 am
by Smackie
um im not really following you :-\ i dont use javascript much :?

Posted: Sun Oct 02, 2005 11:54 pm
by pilau
Just submit your form each time the user clicks on an option in the select menu.