关于用php / html显示消息的问题

所以我是PHP新手。我目前正在学校上网页设计课程,但遇到了问题。每当我点击“提交”按钮时,都会出现错误。我需要代码要做的就是在提交时显示一条消息。任何帮助都会很棒。再次感谢

html

<form action="contact.php" method="post">

<label>First Name:</label>

<input type="text" name="fname" id="fname"><br><br>

<label>Last Name:</label>

<input type="text" name="lname" id="lname"><br><br>

<label>Phone No:</label>

<input type="text" name="phone" id="phone"><br><br>

<label>Address:</label>

<textarea name="address" rows="5"></textarea><br><br>

<label>Number of people:</label>

<input type="number" name="people" id="people"><br><br>

<input type="submit">

PHP

  <?php

$fname = $_POST["fname"];

$lname = $_POST["lname"];

$phone = $_POST["phone"];

$add = $_POST["address"];

$people = $_POST["people"];

echo "<b>Entered Information is</b><br>";

echo "First Name:".$fname."<br>";

echo "Last Name:".$lname."<br>";

echo "Phone Number:".$phone."<br>";

echo "Address:".$add."<br>";

echo "No.of People:".$people."<br>";

?>

ZCY_1234X 回答:关于用php / html显示消息的问题

暂时没有好的解决方案,如果你有好的解决方案,请发邮件至:iooj@foxmail.com
本文链接:https://www.f2er.com/3142156.html

大家都在问