954,574 Members — Technology Publication meets Social Media
Username:
Password:
Lost login information?
Have something to say? Contribute New Article Reply to this Article

Display multiple data entries froma single form

HI ... I m trying to make a form entry with input elements..I have an ADD button on the form besides a SUBMIT button..After the user enters the input fields & presses the ADD button, I want the form data to be displayed on the same form page. When the user has finished entering the data & clicks the submit button the array of form data should be inserted in the MySQL database. Pleas help me with this.

swamiprasad
Newbie Poster
2 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 
HI ... I m trying to make a form entry with input elements..I have an ADD button on the form besides a SUBMIT button..After the user enters the input fields & presses the ADD button, I want the form data to be displayed on the same form page. When the user has finished entering the data & clicks the submit button the array of form data should be inserted in the MySQL database. Pleas help me with this.


first create a form and then an action page and view page for it in php and and create a table in the data base with all the fields you need to enter.

elanorejoseph
Light Poster
36 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 
first create a form and then an action page and view page for it in php and and create a table in the data base with all the fields you need to enter.


This is Java web development not PHP web development my friend...

peter_budo
Code tags enforcer
Moderator
15,436 posts since Dec 2004
Reputation Points: 2,806
Solved Threads: 902
 
This is Java web development not PHP web development my friend...


sorry..... i didnt noticed it....

elanorejoseph
Light Poster
36 posts since Jan 2009
Reputation Points: 10
Solved Threads: 0
 

Any updates guys...help needed urgently..

swamiprasad
Newbie Poster
2 posts since Jun 2009
Reputation Points: 10
Solved Threads: 0
 

Thre are different ways to do this.

1) You can use java script to add more rows
2) You can refresh the same page along with the data entered

However I am proceeding with option 2.

You will have two buttons. Based on the button click you can decide your action page
using java script.

1st button will refresh the same page and second button will direct to the submit page.

When you click the first page store all your form values in a array list or any other collection object and populate the same values in the form again plus one more row for new entry.

On click of second button , the action goes to final page. retrives all form values in a collection object and inserts to database.

Vijay
PM, Coromandel Infotech

VijayaKumar.S
Newbie Poster
1 post since Oct 2010
Reputation Points: 7
Solved Threads: 0
 

This article has been dead for over three months

Post: Markdown Syntax: Formatting Help
You