Hi all,
I'm pretty new to PHP, not sure where I am going wrong with this code.
I'm trying to make a database that inserts data from a form to the database (that works and displays data etc), next part is to have a checkbox next to each row that I can tick, then delete that Record.
Heres a sample of the code
[code=php]
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['message'] . "</td>";
echo "<td>" . $row['time'] . "</td>";
echo "<td>" . "<input type="checkbox" name="cbox[', $row['id'], ']"/>" . "</td>";
echo "</tr>";
}
[/code]
I currently get this error from the server
that being the checkbox part.
Any hints guys?
I'm pretty new to PHP, not sure where I am going wrong with this code.
I'm trying to make a database that inserts data from a form to the database (that works and displays data etc), next part is to have a checkbox next to each row that I can tick, then delete that Record.
Heres a sample of the code
[code=php]
{
echo "<tr>";
echo "<td>" . $row['id'] . "</td>";
echo "<td>" . $row['name'] . "</td>";
echo "<td>" . $row['email'] . "</td>";
echo "<td>" . $row['message'] . "</td>";
echo "<td>" . $row['time'] . "</td>";
echo "<td>" . "<input type="checkbox" name="cbox[', $row['id'], ']"/>" . "</td>";
echo "</tr>";
}
[/code]
I currently get this error from the server
Code:
"Parse error: syntax error, unexpected T_STRING, expecting ',' or ';' on line 57"
Any hints guys?
Comment