[Solved] Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ for echo statement with variables [closed]


You have several problems with your line.

echo "<td><form action=\"del_prod.php\" method=\"post\"><input type=\"checkbox\" name=\"product_id\" value=\"".$row['product_id']."\" /></td>";
  • You’re not escaping the double quotes.
  • You are missing the opening < on the input tag.
  • You’re not closing the input tag.
  • You’re not concatenating the $row[‘product_id’] in the string properly.
  • You’re missing a semi-colon.

This is all aside from the fact that the form tag shouldn’t really be in the <td>. It should be outside of the table, or better yet without a table at all! 🙂

1

solved Parse error: syntax error, unexpected T_STRING, expecting ‘,’ or ‘;’ for echo statement with variables [closed]