Creating HTML Table With POST
I am trying to create a webpage that takes user input, posts it to a creation page and then creates another webpage displaying the data in a html table. I am using file_put_content
Solution 1:
$tbl = '';
for ($i = 0; $i < count($ingredient); $i++) {
$tbl.= '<tr>';
$tbl.= '<td>' . $ingredient[$i] . '</td>';
$tbl.= '<td>' . $amount[$i] . '</td>';
$tbl.= '<td>' . $note[$i] . '</td>';
$tbl.= '</tr>';
}
Use this.
By the way, You forgot to put a closing </tr>
in the heading row.
Post a Comment for "Creating HTML Table With POST"