duanjiuhong5843 2010-02-11 01:12
浏览 23
已采纳

表格助手:还有其他好处吗?

I am new to codeigniter and I have just created a test login system. Chuffed...

I would like to make a form for this login system as I have just been passing the username/password directly for testing.

I am trying to work out the benefits of using the form helper. It helps me contsruct a form easily but can I not do this in just pure html? Is there another benefit of the form helper - I am just talking about the part that creates the form and not the validation - I am guessing I can use the validation regardless of how the form was created?

Thanks all

  • 写回答

3条回答 默认 最新

  • douwen9345 2010-02-11 01:15
    关注

    The form helper exists to give you programmatic-control over your form. Yes, you could write it in HTML, but then you'll find yourself inserting PHP into your HTML when you want to auto-populate fields that need to persist between submissions and other similar stuff that is common to forms. Using this helper will keep your logic in the controller, and out of your views as much as possible.

    By the way, good choice learning MVC!

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(2条)

报告相同问题?

悬赏问题

  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本
  • ¥15 手机接入宽带网线,如何释放宽带全部速度
  • ¥30 关于#r语言#的问题:如何对R语言中mfgarch包中构建的garch-midas模型进行样本内长期波动率预测和样本外长期波动率预测