问题描述
您好,先生,我在一家软件公司工作.先生,我的主要问题是,当我完成我的项目时,该项目托管在服务器上,因此只显示网站的正视图,但是将来当我更换公司时,我没有演示来观看我的现场项目.所以
我希望该PLZ给我一些技巧,可以在管理登录面板(或任何其他位置)中设置以进入管理面板.现在我要用这种方法做这项工作
Hello sir i am working in one software company. sir my main problem is that when i complete my project then that project host on the server so only front view of the website appear but in future when i change company i have no demonstraton to see my live project. so
i want that plz give me some trick which can i set in admin login panel (or any other location) to enter into admin panel. now a days i am do this work by this method
if(textbox1.text="abc" && textbox2.text="123")
{
response.redirect("//admin page");
}
这是我在登录页面中的硬代码,但这是不安全的,请给我最好的技巧,以便我在编程时可以做.
this is my hard code in login page but this is is not secure give me best trick which can i can i do during programming.
推荐答案
if(emp_id == 1)
{
Response.Redirect("//Admin Page.");
}
else
{
Response.Redirect("//User Page.");
}
如果您要分配多个管理员而不是创建新列,请在登录详细信息表中(列名IS_ADMIN)将admin设置为1,将普通用户设置为0.
并使用其中一个:
If you want to assign more than one admin than create a new column your login details table .(column name IS_ADMIN) and set as 1 for admin and 0 for general user.
and use that one:
if(IS_ADMIN == 1)
{
Responce.Redirect("//Admin Page");
}
else
{
Response.Redirect("//User Page");
}
这篇关于密码和用户名相关查询的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!