我有一个简单的HTML表单,我试图连接到php脚本,而html表单中的值不会传递给PHP变量。我检查了PHP测试文件,它显示PHP是活动的&安装在XAMPP上。我还测试了另一个php sum函数脚本,并且工作正常。请查看脚本,任何帮助将不胜感激。当我输入任何城市名称See the image for results i get
时,我得到以下结果 <html>
<body>
<p>
<H1>Enter your shipment details</H1></p>
<form action="quotes.php" method="post">
<label for="pickupcity">Pick up Location</label>
<input type="text" id="pickupcity" name="pickupcity"/><br/>
<label for="deliverycity">Delivery Location</label>
<input type="text" id="deliverycity" name="deliverycity"/><br/>
<input type="submit" value="submit" name="submit"/>
</form>
</body>
</html
Here is the PHP part
<html>
<body>
<h1>
Your shipment details.
</h1>
<?php
$pick= $_POST['pickupcity'];
$delivery= $_POST['deliverycity'];
echo 'Thanks for submitting the form.<br/>';
echo 'Your load picks up in ' . $pick;
echo 'and delivers in' . $delivery;
?>
</body>
</html>