PHP Muliple Forms GET method Help Needed
|
<form name="district" action=""> <select name="SelectURL" onChange="location.href=district.SelectURL.options[selectedIndex].value"> <option value="">District</option> <option value="state/district1>DISTRICT1</option> <option value="state/districk2">DISTRICT2</option> <!-- MULIPLE VALUES WOULD BE CALLED HERE FROM THE DATABASE & ACCORDINGLY WILL FETCH THE BRANCH NAMES & DISPLAY IT ON "branch" FORM--> </select></div> </form> <form name="branch" action=""><div> <select name="SelectURL" onChange="location.href=branch.SelectURL.options[selectedIndex].value"> <option value="">Branch</option> <option value="district1/branch1">BRANCH1</option> <option value="district1/branch2">BRANCH2</option> </select></div> </form> |
But the problem I am facing is, once the user selects the district, its been redirected to lets say
localhost/state/district1/ which as an invalid page, i understand i should create a directory
on the server like state>district>index.php & then process the next form according to the values recieved,
but the problem is there are plenty of districs listed according to the state selected..
(yea its kinda complex)

I would like to process the forms back to back . Like if a user chooses a district,
the url should change, lets say a user selected 'district1' from the select options
The url should change from localhost/state/ to localhost/state/district1/ & then according
to the district it should goto next form, that is 'branch' form. I donno how to do that.. Somebody please help me..
Please somebody help me to sort this out.. have been playing around with it since 2days & din't successed.
I hope some warriors would me out.. Thanks
The 2nd Amendment, 1789 - The Original Homeland Security.
Gun control means never having to say, "I missed you."