開発環境
- OS X Lion - Apple(OS)
- Apache (Web Server)
- PHP (サーバーサイドプログラミング言語)
- TextWrangler(Text Editor) (BBEditの無料機能制限版、light版)
『初めてのPHP5』 (David Sklar 著、 桑村 潤 翻訳、 廣川 類 翻訳、 オライリー・ジャパン、2005年、ISBN978-4-87311-257-2)の6章(Webフォームの作成)6.7(演習問題)1を解いてみる。
1.
$_POST['noodle'] = "barbecued pork"、$_POST["sweet"] = array("puff","ricemeat")、$_POST["swee_q"] = "4"、$_POST["submit"] = "submit"となる。
確認。
<form method="POST" action="sample94.php"> Braised Noodles with: <select name="noodle"> <option>crab meat</option> <option>mushroom</option> <option>barbecued pork</option> <option>shredded ginger and green onion</option> </select> <br /> Sweet: <select name="sweet[]" multiple> <option value="puff"> Sesame Seed Puff <option value="square"> Coconut Milk Gelatin Square <option value="cake"> Brown Sugar Cake <option value="ricemeat"> Sweet Rice and Meat </select> <br /> Sweet Quantity: <input type="text" name="sweet_q"> <br /> <input type="submit" name="submit" value="Order"> </form> <?php var_dump($_POST); ?>
0 コメント:
コメントを投稿