I have set up a page that registers a username and password, which adds them to my mySQL database. Now I have this other code logging in with that username and password. So this all works wonderfully.
What I would like to do is redirect the page it logs onto depending on which password they use. Currently it all goes to the same page.
Does it make sense? I hope I worded that right.
Any ideas as to how I can do this?
This is my index page
[code]<?
// connect to database
include(“inc/connect.php”);
// include auth and nav
include(“inc/auth.php”);
// begin content
include(“inc/nav.php”);
// close mysql connection
mysql_close();
?> [/code]
The nav page
[code]<?
// Login & Session example by sde
// nav.php
?>
|
....[/code]
connect page [code]<? // replace with your db info if (!($db = mysql_connect($hostname, $mysql_login , $mysql_password))){ auth page [code]<? // start session // convert username and password from _POST or _SESSION // query for a user/pass match // retrieve number of rows resulted // print login form and exit if failed. exit; Thank you for taking a look and maybe helping me with suggestions!! |