|
|
|
|
![]() ![]() |
Mar 3 2007, 04:41 PM
Post
#1
|
|
|
Newbie [Level 2] ![]() ![]() Group: Members Posts: 31 Joined: 9-August 06 Member No.: 28,049 |
suppose i have a page, page.php?part=1 there i have some text fields. user will give input, but after taking input, it will not put the data in mysql .. but it will take to the next step.. page.php?part=2 (if any field is left blank, it will not go to next page.. ) . and there also some fields.. after the user has filled that form also, then it will insert all data (from part1 and part 2) in mysql. i want to ask, how i can collect data from 2 pages and put in mysql at once.
|
|
|
|
Mar 3 2007, 04:52 PM
Post
#2
|
|
|
A clever man learns from his own mistakes, a WISE man learns from those of OTHERS ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() ![]() Group: [HOSTED] Posts: 884 Joined: 12-April 06 From: Essex, UK Member No.: 21,719 |
Well if you take the vars from page one lets call them $var_pg1_one and $var_pg1_two and store them in page 2 via the POST/GET vars one page two:
CODE $var_pg1_one = $_POST['pg1_one']; $var_pg2_two = $_POST['pg1_two']; then have the form for that page and have hidden fields which contain the vaues of the above variables like: QUOTE <input type=hidden name=var_one value=$var_pg1_one> then on the third page which is the processing page or both forms you just recall all the variables from both pages using the GET/POST method and then store them in the DB Does that make sense? alternatively you can use a select case to change the HTML code of the page and still store the variables as the php page isnt actually a different page. |
|
|
|
![]() ![]() |
Similar Topics
|
Lo-Fi Version | Time is now: 26th July 2008 - 07:56 AM |