i want to create a form for my client. My client require to create a dynamic for him.
suppose, i want to insert 1 record in main table of mysql, and record multiple records in secondary table which has reference key of main table. I dont know how many records against the main table, it maybe one at time or multiple records at time. I want to do it with single form. If client click add more button it show another text field to insert more data.
how i can do it ?????
aneeqtariq_143
0
Newbie Poster
Recommended Answers
Jump to Postjavascript will be used to add a set of form controls. jQuery could be used if you're a bit new to js.
Jump to PostI have the same requirement so I wrote a few lines that would demonstrate the answer to your question and give me a base to work from.
<?php if (isset($_POST['submitted'])){ print_r($_POST); } ?> <html> <head> <script type="text/javascript"> function addTextArea(){ var div = document.getElementById('div_quotes'); div.innerHTML += "<textarea name='new_quote[]' …
All 8 Replies
diafol
adam.adamski.96155
43
Junior Poster
adam.adamski.96155
43
Junior Poster
diafol
adam.adamski.96155
43
Junior Poster
aneeqtariq_143
0
Newbie Poster
Ashvin_1
0
Newbie Poster
diafol
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.