Jump to content

submitting a 2 page form


graham23s

Recommended Posts

Hi Guys,

 

on my join up form i have taken out:

 

Users State

Users Zip/Post Code

Users City

 

i am wanting these drop downs to be generated depending on which country has been selected quick e.g.

 

<?php
$users_selected_country = $_POST['UK'];

// query to select all states/zip post codes/cities assosciated with the UK above result //
?>

 

kind of like when the user submits the first half of thier data, a second form appears populated with data depending on the country they selected but my problem is:

 

1) how would i store the first half of the data? insert it into myslq then use an update to fille the rest in?

 

or is there a way, when the user selects a country i could refresh the main form bringing up a seperate .php form again depending on what the user has selected for the country

 

i know this type of thing can be done with  javascript but im still a beginner at that lol

 

cheers guys

 

Graham

Link to comment
https://forums.phpfreaks.com/topic/97594-submitting-a-2-page-form/
Share on other sites

hi

 

Its not good to store the values into db with out completing the form entry

 

you can solve this problem in two ways one normal way submit the form to second page and store all the fields in hidden value or duplicate the same form and set the text box values to submit values

 

Or second method was to use AJAX to fill the comobo box according to the chnage in first combobox , this method will be most use fulland simple for the user too

 

;)

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.