Jump to content

Tabulating several values within the same column


shamuraq

Recommended Posts

Hi Guys,

 

Usually my form table would have one element of each kind. eg;

 

<form id="form1" name="form1" method="post" action="s_addCheckList.php">
<tr>
    <td width="20%" valign="top" class="italic01">01</td>
    <td width="88%" class="text02">[b]<textarea name="qn" cols="50" class="Question01" id="qn">1 + 1 + 1 =</textarea>[/b]

      <table width="36%" border="0" cellpadding="0" cellspacing="3">
        <tr>
          <td>[b]<input name="choice1" type="text" id="choice1" value="A) 3 groups of 1" size="15" />[/b]</td>
          <td>[b]<input name="choice2" type="text" id="choice2" value="B) 4" size="15" />[/b]</td>
        </tr>
        <tr>
          <td>[b]<input name="choice3" type="text" id="choice3" value="C) -2" size="15" />[/b]</td>
          <td>[b]<input name="choice4" type="text" id="choice4" value="D) 3" size="15" />[/b]</td>
        </tr>

      </table></td>
    <td><table width="100%" border="0" cellpadding="0" cellspacing="3">
      <tr>
        <td class="text02">Answer</td>
      </tr>
      <tr>
        <td><[b]input name="answer" type="text" id="textfield2" value="A) 3 groups of 1" size="5" />[/b]</td>
      </tr>

    </table></td>
  </tr>

</form>

So if you can see i have element 'qn','choice1','choice2','choice3','choice4' and 'answer' to be inserted into the database under their invidual columns eg; `Question`,`choice1`, `choice2`,`choice3`,`choice4` and `answer`.

 

How do i insert into the database if :

1) I have more than one 'qn','choice1','choice2','choice3','choice4' and 'answer' to be inserted into their individual column.

2) Is there a script to compile more than one 'qn','choice1','choice2','choice3','choice4' and 'answer' as an array and submit them into their invidual columns in the database?

 

Thanx in advance guys...

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.