I've this file - t.php, which has an editable table with submit buttons at the end for the last row.
Now I just want the last row and a hidden input element as part of a form to be submitted to another file ts.php. This's what I'm doing. But the output isn't what I expected.
Here's d code of t.php:
<?php
$id = "id1";
$hid = "hidden msg";
print "<table width='100%' border='0' align='center' cellpadding='3' cellspacing='1'>";
print "<thead><tr><th>field1</th><th>field2</th><th>sub</th></tr></thead>";
print "<tr>";
for ($i = 0; $i<3; $i++) {
print "<tr><td>qweert</td><td>sdfgdfg</td><td>SUB</td></tr>";
}
print "<form method='post' action='ts.php'>
<tr><td name='edit1' contenteditable='true'> edit </td>
<td name='edit2' contenteditable='true'> edit </td>
<input type='hidden' name='table' value = {$hid} \>
<td > <input type='submit' value='submit' name='rowSubmit'> </td></tr>
</form>"
?>
In ts.php I'm just printing the post data like this :
<?php
print_r ($_POST);
?>
I want the table cell data which I edited to come in the form post data, but what I get is this :
Array ( [table] => hidden [rowSubmit] => submit )
Can someone please help?
EDIT: replaced all double quotes in print statements with single quotes