<;输入>;PHP中的$\u POST无法引用

<;输入>;PHP中的$\u POST无法引用,php,input,Php,Input,我试图有两个输入框,和一个按钮,将在数据库中更新它们。我有删除、添加新行和其他功能,但这不起作用: echo '<form action="index.php" method="post"><input placeholder="Enter a title here" type = "Text" name = "Title_input" value = "'.${notes.$loc."titles"}.'" style = "top:0px;left:230px;ri

我试图有两个输入框,和一个按钮,将在数据库中更新它们。我有删除、添加新行和其他功能,但这不起作用:

    echo '<form action="index.php" method="post"><input placeholder="Enter a title here" type = "Text" name = "Title_input" value = "'.${notes.$loc."titles"}.'" style = "top:0px;left:230px;right:0px;height:30px;position:absolute;">';
echo '<textarea placeholder="Make note of something here!" cols="94" rows="20" name="Text_input" style="top:40px;left:230px;position:absolute;right:50px;">'.${notes.$loc."notes"}.'</textarea>';

它呼应“失败”。我看不到任何问题,因为文本区域会被输出,所以应该设置。

您必须将输入字段设置为与更新按钮相同的格式。

您必须将输入字段设置为与更新按钮相同的格式。

事实上,为了OP的清晰起见:您当前有两个表单。提交一份表格不会带来其他表格的内容。巩固它们,你就会找到答案。啊,谢谢。我只是把它改了一下,现在它工作得很好。事实上,为了让OP更清楚:你现在有两种表格。提交一份表格不会带来其他表格的内容。巩固它们,你就会找到答案。啊,谢谢。我刚换了一下,现在它工作得很好。
 <form action="index.php" method = "post"><input type="Submit" name="Update" value="Update" style="right:0px;bottom:0px;height:50px;width:200px;position:inherit">
if (isset($_POST['Update']) && isset($_POST['Title_input']) && isset($_POST['Text_input'])) {
echo $_POST['Title_input'];
  } else {
echo "Failed";
  }