私はPHPでピザ注文サイトを作成しています。今私は、フォーム内のURLを介して渡された変数をエコーしたいと思います。私はこのデータを取得する方法を知っています:<?php echo $_GET["numpizzas"]; ?>
。しかし、私は自分のhtmlフォームフィールドに追加する適切な方法を知らない。任意のヘルプは非常に入力フィールドにPHP変数
<?php
echo
'<form action="pizza.php" method="post">
<h1>Thanks for Ordering. Please submit your delivery info.</h1>
<label>Name:</label> <input type="text" name="name">
<label>Address:</label> <input type="text" name="address">
<label>Phone:</label> <input type="text" name="phone">
<label>Money: </label><input type="text" name="money" value="<?php echo "hi"; ?>" >
//Money field does not populate with number, I just see <?php echo $_GET[
<label>Feedback:</label> <input type="text" name="feedback">
<input type="submit" value="Submit">
</form>';
?>
<?php echo $_GET["numpizzas"]; ?>
を高く評価している私はまた、可変$howmanypizzas = $_GET["numpizzas"]; ?>
で整数を格納しようとしたが、それはまだフィールドの値として表示されません。
はいページはphp拡張です – st4rgut