javascript JQuery 移动登录页面
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/5641374/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
JQuery Mobile Login Page
提问by Satch3000
I am looking for a sinple jQuery Mobile login page sample. It needs to use MySQL too. I have googled and found this: Sample Foundbut it's too involved and I need something more simple. Can anyone help please?
我正在寻找一个简单的 jQuery Mobile 登录页面示例。它也需要使用 MySQL。我用谷歌搜索并找到了这个:Sample Found但它太复杂了,我需要一些更简单的东西。有人可以帮忙吗?
回答by Bruce Aldridge
try this. http://www.tutorialized.com/tutorial/Multiple-admin-login-over-MySQL-database-table/64076
试试这个。 http://www.tutorialized.com/tutorial/Multiple-admin-login-over-MySQL-database-table/64076
as for the jquery mobile part, you'll have to bake that in yourself.
至于 jquery 移动部分,你必须自己烘焙。
回答by Liam
Any credentials-based authentication involving a database will be a bit involved but there are things you can do to make it simple without too great a cost on security. One thing to consider is to make this as simple as possible by removing AJAX from the equation. A simple form that posts back the data rather than trying to AJAX-load the results will simplify your project a bit.
任何涉及数据库的基于凭据的身份验证都会涉及到一些问题,但您可以采取一些措施使其变得简单,而不会产生太大的安全成本。要考虑的一件事是通过从等式中删除 AJAX 来使这尽可能简单。回发数据而不是尝试 AJAX 加载结果的简单表单将稍微简化您的项目。
Here's a very simple tutorial on making a login system using PHP and mySQL: http://www.phpeasystep.com/phptu/6.html
这是一个非常简单的使用 PHP 和 mySQL 制作登录系统的教程:http: //www.phpeasystep.com/phptu/6.html
If you can get away with not having a form, you should look into doing a simple .htaccess file with server-side Basic Authentication. No database required for this solution. This would put up a form that asks the person to put in a username an password but wouldn't be styled like your website. If they fail to login, you can kick them to the page of your choice. Otherwise you would show them the website. Here is a link talking about how to set this on the server and generate the needed files: http://tools.dynamicdrive.com/password/
如果您可以摆脱没有表单,您应该考虑使用服务器端基本身份验证做一个简单的 .htaccess 文件。此解决方案不需要数据库。这将建立一个表格,要求该人输入用户名和密码,但不会像您的网站那样设计。如果他们无法登录,您可以将他们踢到您选择的页面。否则,您将向他们展示网站。这是一个讨论如何在服务器上设置它并生成所需文件的链接:http: //tools.dynamicdrive.com/password/