FryShadow Posted July 17, 2006 Share Posted July 17, 2006 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.[code]<form name="wizard_soalan" method="post" action="ques_process.php"> Question :<br> <input type="text" name="question" size="10"><br> <br> Subject :<br> <select size="1" name="subjek"> <option value="0">-Sila pilih-</option> <option value="1">Science</option> <option value="2">English</option> </select><br> <br> Pilih tahap soalan :<br> <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> </select><br> <br> <input type="submit" value="Next"> </form>[/code]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 mysqlthanks for helping Quote Link to comment Share on other sites More sharing options...
willfitch Posted July 17, 2006 Share Posted July 17, 2006 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? Quote Link to comment Share on other sites More sharing options...
FryShadow Posted July 17, 2006 Author Share Posted July 17, 2006 this is the form that will get a data to produce 20 formhttp://i23.photobucket.com/albums/b393/fryshadow/form1-1.jpgand this is the result :form1 http://i23.photobucket.com/albums/b393/fryshadow/form2.jpgtillhttp://i23.photobucket.com/albums/b393/fryshadow/form3.jpgi'm using this code to produce the 20 question[code]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 <input type=\"text\"><br>"; echo "<b>B <input type=\"text\"><br>"; echo "<b>C <input type=\"text\"><br>"; echo "<b>D <input type=\"text\"><br>"; echo "<br>"; }[/code]how i want to save all the 20 form at once ?all the form 1 - 20 is at the same page Quote Link to comment Share on other sites More sharing options...
FryShadow Posted July 18, 2006 Author Share Posted July 18, 2006 anyone ? Quote Link to comment Share on other sites More sharing options...
shree21 Posted July 18, 2006 Share Posted July 18, 2006 Hello...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.. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.