几次登录尝试

编程入门 行业动态 更新时间:2024-10-08 10:56:25
本文介绍了几次登录尝试的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

你好我在php的新手.. 你可以帮我解决如何在php中进行多次登录尝试吗? (如果我们输入错误的密码/用户名) ,,我们将返回上一个表单,我们可以再尝试3次输入正确的密码/用户名,然后再显示错误消息) 感谢之前..

hi i''m a newbie in php.. can you help me how to make several login attempt in php? (if we put wrong password/username,, we will go back to the previous form and we can try 3 more attempts to input the correct password/username before appear an error message) thanks before..

推荐答案

欢迎使用脚本。 如果我们看不到任何帮助或工作的代码,我们无法帮助您。所以,首先你必须向我们展示你到目前为止所编写的代码。然后我们可以看看如何限制登录次数。 并在相应的代码标签中显示任何代码! Ronald Welcome to The Scripts. We cannot help you if we see no code to help or work on. So, first you''ll have to show us the code you have written so far. Then we can have a look at how to limit the number of logins. And show any code within the appropriate code tags! Ronald

抱歉,我没有写代码.. 这里是我的代码.. 这是form.html sorry I didn''t write the code.. here''s my code.. this is the form.html 展开 | 选择 | Wrap | 行号

嗯。 所以你没有使用一个用于存储登录详细信息的数据库,这可能会使事情变得更难。 这种计算尝试的目的是什么?经过这么多尝试后,用户被阻止登录一段时间吗? 我的意思是,你可以使用会话或cookie,但用户可以删除它们......所以它们不是一个好主意。最好的办法是将用户的IP地址存储在数据库中,但从它的外观来看,你还没有使用MySQL。 我建议你有一个看看一些php / mysql教程 - 从长远来看它会对你有所帮助。 问候,马库斯。 Hmm. So you aren''t using a database to store log in details, this may make things harder. What is the purpose of this ''counting of attempts''? Is it so that, after so many tries, the user is blocked from logging in for a certain amount of time? I mean, you could use sessions, or cookies, but the user could just delete them.. so they''re not a great idea. The best bet would be to store the user''s IP address in a database, but by the looks of it you havent had a go with MySQL yet. I recommend you have a look at some php/mysql tutorials - it''ll benefit you greatly in the long run. Regards, markus.

更多推荐

几次登录尝试

本文发布于:2023-11-09 23:27:04,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1573735.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:几次

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!