我怎么有这么多用户 [英] how do i have so many users

查看:75
本文介绍了我怎么有这么多用户的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我希望有一个多用户登录并将它们重定向到特定的文件夹,例如当我有John的用户登录时,当John登录时,将John重定向到account_john / welcome.php,当我有一个用户被调用时亚历克斯和它去了account_alex / welcome.php,有没有人可以给我一些关于它的提示



这里是我的代码:



i want have a multiple user login and redirects them to a specific folder such as when i have user login of John, and when John logs in it redirects John to account_john/welcome.php, and another when i have a user called Alex and it goes to account_alex/welcome.php, is there anyone who can give me a little tips about that

here is my code:

$password = md5(md5("agdagsjagsj".$password."77gggg77g7g7g"));

    $query = mysql_query("SELECT * FROM users WHERE username='$user'");
    $numrows = mysql_num_rows($query);
    if($numrows == 1) {
        $row = mysql_fetch_assoc($query);
        $dbid = $row['id'];
        $dbuser = $row['username'];
        $dbpass = $row['password'];
        $dbactive = $row['active'];

        if ($password == $dbpass) {
            if($dbactive == 1) {

                $_SESSION['userid'] = $dbid;
                $_SESSION['username'] = $dbuser;

                header("Location: ./processing.php");

                }
                else
                    echo "Your account is not active you need to activate your account. $form";

            }
            else
                echo "Your Password is incorrect. $form";

    }
    else
        echo "Your Username is not listed in our database. $form";

    mysql_close();


}
else
    echo "You enter no password. $form";


}
else

    echo "Please enter your username. $form";

推荐答案

密码 = md5(md5( agdagsjagsj


密码。 77gggg77g7g7g< /跨度>));

password."77gggg77g7g7g"));


query = mysql_query( SELECT * FROM users WHERE username ='
query = mysql_query("SELECT * FROM users WHERE username='


这篇关于我怎么有这么多用户的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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