Forum Moderators: coopster

Message Too Old, No Replies

Redirect user afer login PHP

Redirect user after login

         

tommorrison

10:44 am on Aug 13, 2008 (gmt 0)

10+ Year Member



Hi
i have made a database and a login and logout php and everything is working fine. The only thing thats wrong is that when a user logs in they get redirected to a specific page. I want the user to be redirected to a different page for each user. This is the section in my form process php where the redirection php is
// Register the values & redirect:
$_SESSION = mysqli_fetch_array ($r, MYSQLI_ASSOC);
mysqli_free_result($r);
mysqli_close($dbc);

$url = BASE_URL . 'login/memberarea.php'; // Define the URL:
ob_end_clean(); // Delete the buffer.
header("Location: $url");
exit(); // Quit the script.

As you can see its will direct all users to the page memberarea.php

Can anyone help?

Etheco

8:20 am on Aug 14, 2008 (gmt 0)

10+ Year Member



Just make a field in the table for the users, and set it for each user that way.