2008年9月10日 星期三

[PHP]選項鈕的應用

=============HTML============
< form id="form1" name="form1" method="post" action="test6.php">
< p>訂購單< /p>
< p>姓名:
< label>
< input name="uname" type="text" id="uname" />
< /label>
< /p>
< p>電話:
< label>
< input name="uphone" type="text" id="uphone" />
< /label>
< /p>
< p>地址:
< label>
< input name="addr" type="text" id="addr" />
< /label>
< /p>
< p>郵寄方式:


< p>
< label>
< input name="delivery" type="radio" value="掛號" />
< /label>
掛號
< label>
< input name="delivery" type="radio" value="普通" checked />

< /label>
普通
< label>
< input name="delivery" type="radio" value="快捷" />
< /label>
快捷 < /p>
< p>
< input type="hidden" name="param" value="訂購單確認" />

< label>
< input type="submit" name="Submit" value="送出" />
< /label>
< label>
 
< input type="reset" name="Submit2" value="重設" />
< /label>
< /p>
< /form>

=================PHP=================
< ?php
echo "< b>< font color='purple'>".$_POST["param"]."< /font>

";
echo "< b>< font color='blue'>".$_POST["uname"]."< /font>< /b>的連絡電話是< b>< font color='blue'>".$_POST[uphone]."< /font>< /b>< p>";
echo "您的訂單會依照< b>< font color='blue'>".$_POST["delivery"]."< /font>< /b>送到下列地址";

echo "< hr>< p>";
echo "< p>< font color='blue'>".$_POST[addr]."< /font>< /br>"
?>

沒有留言: