I have created a php table like so:
echo "<table border = '0' cellpadding ='10'>";
echo "<tr>
<td> Question <td>Mark</td><td>Criteria</td>
<td>Feedback</td>
</tr>";
while ($row = mysql_fetch_array($result))
{
$question[]=$rows['question'];
echo "<tr>";
echo "<td>". $row['question']. "</td>";
echo "<td>" ."<input type = 'text' name = 'mark[]' size = '1' value = '0' id = 'mark'/>/". $row['maxMark'] . "</td>";
$maxMark[] = $row['maxMark'];
echo "<td>".$row['criteria']."</td>";
echo "<td>" . "<input name = 'feedback".$counter."' id= 'feedback' value='Enter feedback'>". "</td>";
echo "</tr>";
$counter++;
}
echo "</table>";
echo "</tr>\n";
echo "</table>";
I want to get the all the data i input from mark and put it into an array and then post it to another page and update my database.
The only thing i am having trouble with is getting the values i input and putting them all in an array
any help would be appreciated
🙂
Use the form array notation …
then everything will be array
p.s. you should use double-quotes for html tag attributes and echo with ‘,’ rather than ‘.’