有一个简单的方法来处理表单与PHP? [英] Is there an easy way to handle forms with PHP?

查看:238
本文介绍了有一个简单的方法来处理表单与PHP?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

处理PHP中的表单总是让我头疼。主要格式化;处理表单输入中的标点符号,操作数据库插入的字符串,从数据库检索时删除等。

Dealing with forms in PHP has always given me major headaches. Primarily formatting; handling punctuation inside a form input, manipulating strings for database insertions, stripping when retrieving from database, etc.

有一个简单的替代strip_slashes和所有的垃圾?我不想要一个工具,像一个窗体向导,为你做一切 - 我仍然想要一个高水平的自定义。虽然是一个工具,我想要这个文本字段连接到这个数据库字段,然后它处理所有繁琐的工作。

Is there an easy alternative to strip_slashes and all that junk? I don't want a tool like a form wizard that does everything for you - I still would like a high level of customization. What would be nice though is a tool that says "I want this text field to connect to this database field.", then it handles all that tedious work.

推荐答案

您应该查看专门用于支持涉及用户输入的系统的PHP框架。

You should look into PHP frameworks which are specifically designed to support systems involving user input.

我已经使用CakePHP,有用的(虽然它往往假设你有一个相当简单的数据模型,你不介意从头开始创建它)。它是高度可定制的(你自己创建所有表单组件),如果你使用它的全部功能,它将处理斜杠和数据库字段和所有其余。

Personally I've used CakePHP and it's been very useful (though it does tend to assume you have a fairly simple data model and you don't mind creating it from scratch). It's highly customisable (you create all form components yourself) and if you use its full capabilities it will handle slashes and database fields and all the rest.

其他框架可用。 ..

Other frameworks are available...

这篇关于有一个简单的方法来处理表单与PHP?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆