登录编码存储在sql server中? [英] login coding to store in sql server ?

查看:86
本文介绍了登录编码存储在sql server中?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

:(((请回复..
我正在尽快完成我的项目发布.

:(( please reply..
i am doing my project post as soon as possible

推荐答案

您显然希望我尽快答复.我希望这能满足您的需求.我在这里没有其他问题.
You apparently would like me to reply as soon as possible. I hope this satisfies your needs. I see no other question here.


您先完成注册还是注册??


okie在登录页面..



其背后的逻辑是获取在用户名文本框中输入的用户名值..


如果您使用过属性..

获取并设置值.


从文本框中获取值到属性,并将用户名的值传递给数据库


在后端 sqlserver


编写查询以选择其中username =(从文本框传递的参数)的行


查询将像dis ..


从表名中选择*,其中user_name = @ user_name


这将返回行..

将其填充到数据表中.

检查数据表是否具有行..

如果不是,则打印消息无效的用户名/密码"

如果数据表有行,则检查用户输入的密码是否与从数据表返回的密码匹配...


如果是,则将其重定向到主页以进一步运行.

或打印消息无效的用户名/密码"

我告诉过你逻辑..



至少我已经给你了逻辑

但是这里周围的一些人不想浪费时间..

并且只有在他们想虐待回答了问题的人时才回答.


所以你想做什么就休息..




每个人都知道..谁是这里的弱点:laugh:


谢谢问候:)

richards ...
have you done with registeration or signup first??


okie at login page..



the logic behind this is to get the value of the username entered in the textbox for username..


if you have used properties..

to get and set the value..


get the value from the textbox to the property and pass that value of username to the database


at the backend sqlserver


write query to select the rows where username=(the parameter passed from the textbox)


query wil be like dis..


select * from tablename where user_name=@user_name


this will return the rows..

fill it in the datatable.

check if the datatable has rows or not..

if not then print the message "Invalid username/password"

and if the datatable has the rows then check whether the password entered by the user matches wid the password returned from the datatable...


if yes then redirect it to home page for further functioning.

or print the message "invalid username/password"

i have told you about the logic..



at least i have given you the logic

but some people around here do not want to waste their time..

and only answer when they want to abuse the one who has answered the question..


so rest on you wat u want to do..




everyone knows.. who is the retard here :laugh:


thanks regards :)

richards...


您得到的建议非常糟糕,而且根本不安全.您永远不要从数据层返回正确的密码.您应该让数据层检查您输入的密码是否正确.''
除此之外,其他答复是正确的,这里没有实际的问题.这是一个面向程序员的论坛,这意味着编写代码然后需要帮助的人们.如果您根本不知道如何编写代码,请考虑请人为您编写代码.

我对与智障搏斗不感兴趣.我尊重有人花时间回答,我只是想完善这个答案.永远不要在密码表上执行select *,总要执行select count(*)并让您的数据库检查输入的密码.
The advice you have been given is very bad, and not secure at all. You should NEVER return the correct password from the data layer. You should make the data layer check if the password you were given was correct.''

Beyond that, the other reply was correct, there''s no actual question here. This is a forum for programmers, which means, people who write code, and then need help with it. If you don''t know how to write code at all, consider paying someone to write it for you.

I am not interested in fighting with retards. I respect that someone took the time to answer, I am just making a point to refine that answer. Never do a select * on your password table, always do a select count(*) and have your DB check the password that was entered.


这篇关于登录编码存储在sql server中?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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