表单开始标记中的PHP标记获取错误

时间:2017-12-16 19:05:31

标签: php html

当我在html表单标记中放入一些代码时,它不能正常工作。

<form action = "update.php?id= <?php echo $id; ?>" method="post">

上面的表单打开标记是将php结束标记作为结束标记。为什么会这样?它应该采用最后一个结束标记作为它的结束标记。 视图源如下:

<div class="phpcoding">
<section class="headeroption">
    <h2>PHP CRUD</h2>
</section>
    <section class="maincontent">
UDATE tbl_crud SET Name = 'mister', skill = 'Biscuit', email = 'mistecookie@gmail.com' WHERE id = ' 8'You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near 'UDATE tbl_crud SET Name = 'mister', skill = 'Biscuit', email = 'mistec' at line 152

1 个答案:

答案 0 :(得分:1)

您可以尝试这样

<form <?php echo 'action="update.php?id='.$id.'" method="post"'; ?> >

<form <?php echo 'action="update.php?id='.$id.'"'; ?> method="post">

希望它对你有用。 :))

相关问题