Chinaunix首页 | 论坛 | 博客
  • 博客访问: 4471039
  • 博文数量: 1148
  • 博客积分: 25453
  • 博客等级: 上将
  • 技术积分: 11949
  • 用 户 组: 普通用户
  • 注册时间: 2010-05-06 21:14
文章分类

全部博文(1148)

文章存档

2012年(15)

2011年(1078)

2010年(58)

分类: 嵌入式

2011-08-25 19:46:44

HTML_QucikForm

test8.php

  1. <?php
  2.         if(isset($_POST['submit']))
  3.         {
  4.                 echo "you like the following languages:
    "
    ;
  5.                 foreach($_POST['languages'] as $language)
  6.                 {
  7.                         $language = htmlentities($language);
  8.                         echo "$language
    "
    ;
  9.                 }
  10.         }

  11. ?>

test.html

  1. <form action = "test8.php" method = "post">
  2.         what's your favorite programming language? <br />
  3.         <input type ="checkbox" name = "languages[]" value = "csharp" />C#<br />
  4.         <input type ="checkbox" name = "languages[]" value = "perl" />Perl<br />

  5.         <input type ="submit" name = "submit" value = "submit" />
  6. </form>









安装HTML_QuickForm

  1. root@ywx:/usr/local/php/bin# ./pear install --onlyreqdeps HTML_QuickForm
  2. WARNING: "pear/HTML_QuickForm" is deprecated in favor of "pear/HTML_QuickForm2"
  3. WARNING: "pear/HTML_Common" is deprecated in favor of "pear/HTML_Common2"
  4. downloading HTML_QuickForm-3.2.12.tar ...
  5. Starting to download HTML_QuickForm-3.2.12.tar (Unknown size)
  6. .................................................................................................................................done: 640,512 bytes
  7. downloading HTML_Common-1.2.5.tar ...
  8. Starting to download HTML_Common-1.2.5.tar (Unknown size)
  9. ...done: 20,992 bytes
  10. install ok: channel://pear.php.net/HTML_Common-1.2.5
  11. install ok: channel://pear.php.net/HTML_QuickForm-3.2.12
  12. root@ywx:/usr/local/php/bin#


阅读(927) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~