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.

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.

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...

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

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

Any updates guys...help needed urgently..

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

commented: 1 year to late, with weak solution -3
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.