Jump to content


This topic is now archived and is closed to further replies.


insert multiple data with multiple form at once

Recommended Posts

hello i'm new here

i got some prob for developing my system.actually my system if for school,teachers can add question(objective) and publish it to student when needed.

<form name="wizard_soalan" method="post" action="ques_process.php">
              &nbsp;&nbsp;Question  :<br>
              &nbsp;&nbsp;<input type="text" name="question" size="10"><br>
              &nbsp;&nbsp;Subject :<br>
              &nbsp;&nbsp;<select size="1" name="subjek">
                          <option value="0">-Sila pilih-</option>
                          <option value="1">Science</option>
                          <option value="2">English</option>
              &nbsp;&nbsp;Pilih tahap soalan :<br>
              &nbsp;&nbsp;<select size="1" name="tahap">
                          <option value="0">-Sila pilih</option>
                          <option value="1">UPSR</option>
                          <option value="2">PMR</option>
                          <option value="3">SPM</option>
              &nbsp;&nbsp;<input type="submit" value="Next">

this form will produce a simple form to add question depends on the $question value. lets say 20 question then 20 form will produce.

the problem is how i want to save the 20 question in the database.i'm using php and mysql

thanks for helping

Share this post

Link to post
Share on other sites
It looks like your problem isn't saving 20 questions into the database.  Your problem looks like you don't know how to setup a form, catch the POSTed data, and then insert into the database.  Your question is way to generic and you have shown us a form, that looks like it has nothing to do with 20 questions.

So I'm going to ask this question:  what is the problem?

Share this post

Link to post
Share on other sites
this is the form that will get a data to produce 20 form


and this is the result :





i'm using this code to produce the 20 question

for ($i=1;$i<=$no;$i++)
                echo "<br>";
                echo "<b>No soalan : $i <br>";
                echo "<b>Soalan : <br>";
                echo "<textarea name=\"$soalan\" rows=\"7\" cols=\"30\" wrap=\"on\"></textarea><br>";
                echo "<b>Jawapan :<br>";
                echo "<b>A&nbsp;&nbsp;<input type=\"text\"><br>";
                echo "<b>B&nbsp;&nbsp;<input type=\"text\"><br>";
                echo "<b>C&nbsp;&nbsp;<input type=\"text\"><br>";
                echo "<b>D&nbsp;&nbsp;<input type=\"text\"><br>";
                echo "<br>";

how i want to save all the 20 form at once ?
all the form 1 - 20 is at the same page

Share this post

Link to post
Share on other sites
hey think u should take the form tag...
n whn u press the next button on that u can insert that values in the table..

Share this post

Link to post
Share on other sites


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.