bsxiong
10-08-2007, 11:29 AM
Hi all,
this is my code to insert information to my database:
<style type=text/css>body {font-family:verdana; font-size:12px;}.table{ font-size: 12px}</style>
<form name="classroom" action="/index.php" method="post">
<table width="500" border="0" cellspacing="0" cellpadding="5" class=table>
<tr>
<td bgcolor=#F5F5F5>Your Name: </td>
<td><input name="name" value=""></td>
</tr>
<tr>
<td>Title of Problem: </td>
<td><input name="title"></td>
</tr>
<tr>
<td>Date:<font color=gray><br>Year-Month-Day<br>2007-09-28</font> </td>
<td><input name="date"></td>
</tr>
<tr>
<td>Room Number:</td>
<td><input name="room" maxlength=3></td>
</tr>
<tr>
<td>Computer Number:<font color=gray><br>(eg 09)</font> </td>
<td><input name="computer_number" maxlength=2></td>
</tr>
<tr>
<td>Problem Type: </td>
<td><select name="problem_type">
<option value="">Please Select One</option>
<option value="Library">Library</option>
<option value="Chat">Chat</option>
<option value="Internet">Internet</option>
<option value="Other">Other</option>
</select></td>
</tr>
<tr>
<td>Problem Summary : </td>
<td><textarea name=problem_summary cols=40 rows=10></textarea></td>
</tr>
<tr>
<td>What did you do? </td>
<td><textarea name=action cols=40 rows=10></textarea></td>
</tr>
<tr>
<td>Instructor's Name: </td>
<td><input name="instructor_name"></td>
</tr>
<tr>
<td>Instructor's Course/Dept: <font color=gray><br></font> </td>
<td><input name="course"></td>
</tr>
<tr>
<td></td>
<td><input type="submit"></td>
</tr>
</table></form>
for example: Currently, the code only let you submit one field at a time. So then there is a little problem if....say we have 9 computer with the same problem. I don't want to have to submit 9 different times. Is there a way to just have a check box or something like that.
So if say i computer number 7,8,9,11,21 have the same problem, i could just select them in a multiList or check them all in some check box and when i hit submit, computer 7,8,9,11,21 will be added to my mysql DB with the same information.?
any help will be great.
this is my code to insert information to my database:
<style type=text/css>body {font-family:verdana; font-size:12px;}.table{ font-size: 12px}</style>
<form name="classroom" action="/index.php" method="post">
<table width="500" border="0" cellspacing="0" cellpadding="5" class=table>
<tr>
<td bgcolor=#F5F5F5>Your Name: </td>
<td><input name="name" value=""></td>
</tr>
<tr>
<td>Title of Problem: </td>
<td><input name="title"></td>
</tr>
<tr>
<td>Date:<font color=gray><br>Year-Month-Day<br>2007-09-28</font> </td>
<td><input name="date"></td>
</tr>
<tr>
<td>Room Number:</td>
<td><input name="room" maxlength=3></td>
</tr>
<tr>
<td>Computer Number:<font color=gray><br>(eg 09)</font> </td>
<td><input name="computer_number" maxlength=2></td>
</tr>
<tr>
<td>Problem Type: </td>
<td><select name="problem_type">
<option value="">Please Select One</option>
<option value="Library">Library</option>
<option value="Chat">Chat</option>
<option value="Internet">Internet</option>
<option value="Other">Other</option>
</select></td>
</tr>
<tr>
<td>Problem Summary : </td>
<td><textarea name=problem_summary cols=40 rows=10></textarea></td>
</tr>
<tr>
<td>What did you do? </td>
<td><textarea name=action cols=40 rows=10></textarea></td>
</tr>
<tr>
<td>Instructor's Name: </td>
<td><input name="instructor_name"></td>
</tr>
<tr>
<td>Instructor's Course/Dept: <font color=gray><br></font> </td>
<td><input name="course"></td>
</tr>
<tr>
<td></td>
<td><input type="submit"></td>
</tr>
</table></form>
for example: Currently, the code only let you submit one field at a time. So then there is a little problem if....say we have 9 computer with the same problem. I don't want to have to submit 9 different times. Is there a way to just have a check box or something like that.
So if say i computer number 7,8,9,11,21 have the same problem, i could just select them in a multiList or check them all in some check box and when i hit submit, computer 7,8,9,11,21 will be added to my mysql DB with the same information.?
any help will be great.