melbourne1815
-
Posts
1 -
Joined
-
Last visited
Never
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.
how to post multiple inputs from mysql_fetch_array using a single submit button?
in PHP Coding Help
Posted
hi i need help on posting multiple inputs in a single button...while using mysql_fetch_array
here is my codes:
<?
$re6 = mysql_query('select username from users where course = "BSIT" and yearlevel = "FOURTH"');
?>
<br />
<h1>Post Grade</h1>
<h1>IT, Fourth Year</h1>
<br />Please fill the following form to send The Grade<br />
<?
$n = 0;
while($row = mysql_fetch_row($re6))
{
echo'<form action="grade_post.php" method="post">';
echo'Recipient<span class="small">(Username)</span><input type="text" value="'.$row['username'].'" readonly="readonly" id="recip" name="recip[' . $n . ']" />';
echo'Subject<input type="text" value="'.htmlentities($otitle, ENT_QUOTES, 'UTF-8').'" id="title" name="title[' . $n . ']" />';
echo'<input type="hidden" value="FOURTH" id="year" name="year[' . $n . ']" />';
echo'<input type="hidden" value="FIRST" id="sem" name="sem[' . $n . ']" />';
echo'Grade<input type="text" id="message" name="message[' . $n . ']" ><br />';
++$n;
}
?>
i get all my recipients in every input type, but when i tried to post it in my database not all of them are posted rather only one of them are posted in my database ...what i want to happen is that all of my recipients in every input type will be posted in my database with different ids'...help pls...