Welcome Guest ( Log In | Register)



 
Reply to this topicStart new topic
> Putting Data Of 2 Pages In Mysql At Once
apple
post 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.
Go to the top of the page
 
+Quote Post
shadowx
post 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.
Go to the top of the page
 
+Quote Post

Reply to this topicStart new topic

Collapse

> Similar Topics

Topics Topics
  1. Problem On Mysql "order By"(5)
  2. Increment A Mysql Column(6)
  3. Can You Add Images Into A Mysql Database?(20)
  4. Creating Profiles In Php/mysql ?(7)
  5. Php Search Engine Script For Mysql Database(11)
  6. How Good Is This Data Cleaning Function?(2)
  7. Dynamic Php Pages(5)
  8. Some Mysql Basics(4)
  9. Using Multiple Selection Array In Table To Order Data(1)
  10. The Artists Tutorials :mysql Basic Commands(0)
  11. Php An Js Window.open Pages Trouble.(3)
  12. Php Email Validation(1)
  13. [mysql]get Id Of Loged In User?(7)
  14. [mysql/php]need Som Basic Help(13)
  15. [php/mysql]id Trouble [resolved](3)
  1. Mysql Won't Update(4)
  2. Php + Mysql Question!(4)
  3. Php Pages Problem [resolved](5)
  4. 2 Pages Into One(10)
  5. Tools Needed!(9)
  6. Best Sites For Learning Php-mysql(4)
  7. Protect Pages(20)
  8. Pagination(3)
  9. Php And Mysql Programming(2)
  10. Best Php And Mysql Editor For Noobs(6)
  11. Html Form!(4)
  12. Mysql Error(3)
  13. Create Table - Mysql Code - Help(1)


 



- Lo-Fi Version Time is now: 26th July 2008 - 07:56 AM