2017-09-25 17 views
1

私はWAMPを使用しています。私のHTMLフォームはPHPファイルにデータを送信していません。HTMLフォームデータをPHPファイルに渡すことができません

私のHTMLファイルが

<html> 
<body> 
<form acton="process.php" method="POST"> 

Quantity: <input name ="quantity" type ="text" /> 
    <input type="submit"/> 
</form> 
</body> 
</html> 

で、あなたのHTMLコードを記述するミスを犯した

<html> 
<body> 
<?php 
$quantity=$_POST['quantity']; 

echo $quantity; 

?> 
</body> 
</html> 
+1

する必要があります –

答えて

0

下のように私のPHPファイルprocess.phpです。それはあなたが、それは「アクション」ではない「アクトン」である必要がありタイプミスがありactionしていないacton

<html> 
<body> 
<form action="process.php" method="POST"> 

Quantity: <input name ="quantity" type ="text" /> 
    <input type="submit"/> 
</form> 
</body> 
</html> 
関連する問題