簡體   English   中英

HTML Post提供了404錯誤

[英]HTML Post is giving 404 error

我正在將值從一頁發布到另一頁。 這是一個非常簡單的過程,但我不斷收到錯誤消息:

找不到在此服務器上找不到請求的URL /“send_notification.php”。 此外,嘗試使用ErrorDocument處理請求時遇到404 Not Found錯誤。

這是我的第一頁:

<html>

<body>
<form action=“send_notification.php” method=“post”>
<table>
<tr>
<td>title:</td>
<td><input type=“text” name=“title”/></td>
</tr>

<tr>
<td>Message: </td>
<td><input type=“text” name=“message”/></td>
</tr>

<tr>
<td>
<input type="submit" value="Submit">
</td>
</tr>

</table>
</form>
</body>
</html>

這是我的第二頁:

<?php

require "init.php";
$messages=$_POST['message'];
$title=$_POST['title'];
echo $messages;
echo $title;
?>

我很困惑這是怎么回事。

在您的代碼中,該頁面正在請求URL http://example.com/“send_notification.php“而不是http://example.com/send_notification.php

<html>

<body>
<form action="send_notification.php" method="post">
<table>
<tr>
<td>title:</td>
<td><input type="text" name="title"/></td>
</tr>

<tr>
<td>Message: </td>
<td><input type="text" name="message"/></td>
</tr>

<tr>
<td>
<input type="submit" value="Submit">
</td>
</tr>

</table>
</form>
</body>
</html>

我已經改變了以正確的HTML報價: "
在html(和php)中,使用'"

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM