使用javascript和PHP验证表单 [英] Validating form by using javascript and PHP

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

问题描述

大家好。我有一个需要验证的表单。如果表单中的某些值不在特定范围内,则javascript应该启动带有特定消息的模式框。另外,我需要使用表单中的值并使用php生成一个文件。我想知道这种类型的php和javascript的协同作用是否正确。你能告诉我怎么做吗?



我尝试了什么:



如果有人发布一个例子,我会很感激。到目前为止,我只使用javascript进行所有任务(生成文件除外)。请帮忙。

Hi everybody. I have a form that needs to be validated. If some of the values in form are not within the specific range, the javascript should "launch" modal box with the certain message. Also, I need to use the values from form and generate a file with php. I wonder if this type of synergy of php and javascript is right. Can you please tell me how to do this?

What I have tried:

I would be thankful if someone post an example. So far I'm using only javascript for all tasks (except generating file). Please help.

推荐答案

查看这些:

1. JavaScript表单验证 [ ^ ]

2. PHP 5文件 [ ^ ]
Check these out:
1. JavaScript Form Validation[^]
2. PHP 5 File[^]


更多链接 -

JavaScript表单验证:快速简便! [ ^ ]

http://www.the-art-of-web.com/javascript/validate/ [ ^ ]



使用PHP,您将进行服务器端验证 -

PHP服务器端表格验证& sim; W3schools教程 [ ^ ]

http://www.codingcage.com/2015 /02/server-side-form-validations-using-php.html [ ^ ]
More links -
JavaScript Form Validation : quick and easy![^]
http://www.the-art-of-web.com/javascript/validate/[^]

With PHP, you will do server side validations -
PHP Server Side Form Validation ∼ W3schools Tutorials[^]
http://www.codingcage.com/2015/02/server-side-form-validations-using-php.html[^]


这篇关于使用javascript和PHP验证表单的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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