View Full Version : Specific User Login Redirect
01-23-2004, 09:37 PM
PLEASE HELP ME.
I do not know much about coding.. I have created a database (mysql) I have a login and registration page. I need to make it so a user gets directed to their own page when they login..
If username is Dizzy123 then go to
I don't even know where to start.. Can some one give me some advice.
01-23-2004, 10:15 PM
Well that pretty easy. In the code for checking the users login you can simply use a redirect header.
After the login has been verified you can grab the username either from the form they submitted or from the query you did to validate the login.
$username = $_POST['username'];
$username = $row['username'];
Obviously the exact coding will depend on what your coding is.
And then all you need is to redirect them with a redirect header like so.
header("Location: /members/" . $username);
you can use either a relative path something like above or use the full URL.
header("Location: http://www.mysite.com/members/" . $username);
01-23-2004, 10:25 PM
Create a session on the login page called username that matches the username field in your form. Put something like this on the logged in correctly page...
$user = $_SESSION['username'];
Powered by vBulletin® Version 4.2.2 Copyright © 2015 vBulletin Solutions, Inc. All rights reserved.