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:

<?php

if ($user) {
    if ($password) {
        require("connect.php");

        $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");
                    exit;

                    }

                    else
                        echo "INTERNET BANKING ACCESS IS CURRENTLY RESTRICTED, PLEASE CALL YOUR ACCOUNT OFFICER FOR ACTIVATION!. $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";

you can do so using .htaccess with url rewriting if on apache.
on IIS yo have to prepare iirf.ini for the similar reason.
A typical rewrite rule in .htaccess file would look like this -

RewriteRule ^index.php?username=(.*)$  account_$1/welcome.php 

how do i do this please if you can demonstrate i will appreciate it

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.