我正在尝试将在HTML页面中的表单中输入的文本发送到PHP页面。但是,应该使用POST方法隐藏的内容显示出来。代码在这里:
<!DOCTYPE HTML>
<head>
</head>
<body>
<h1> Your daily tasks </h1>
<form>
<form action = "entry.php" method="post"> <!-- POST the data to entry.php. Don't know yet why we post to a php -->
<input type="text" name = "Monday1" />
<input type="text" name = "Monday2" />
<input type="text" name = "Monday3" />
<br>
<input type="text" name = "Tuesday1" />
<input type="text" name = "Tuesday2" />
<input type="text" name = "Tuesday3" />
<br>
<input type="text" name = "Wednesday1" />
<input type="text" name = "Wednesday2" />
<input type="text" name = "Wednesday3" />
<br>
<input type="text" name = "Thursday1" />
<input type="text" name = "Thursday2" />
<input type="text" name = "Thursday3" />
<br>
<input type="text" name = "Friday1" />
<input type="text" name = "Friday2" />
<input type="text" name = "Friday3" />
<input type="submit" value = "Commit"/>
</form>
</body>
</html>
如果我在第一列放入“Foo”,则URL变为file:/// C:/xampp/htdocs/productivitywebsite.html?Monday1 = Foo&amp; Monday2 =&amp; Monday3 =&amp; Tuesday1 =&amp; Tuesday2 =&amp; Tuesday3 =&amp; Wednesday1 =&amp; Wednesday2 =&amp; Wednesday3 =&amp; Thursday1 =&amp; Thursday2 =&amp; Thursday3 =&amp; Friday1 =&amp; Friday2 =&amp; Friday3 =
它不应该与POST方法有关。 此外,有没有办法让代码显示为代码而不必4x空间的一切?如果不得不对每行代码进行空格键,那就太烦人了。
答案 0 :(得分:0)
看起来这个问题是一个额外的标签。谢谢!