hanwei Posted November 14, 2006 Share Posted November 14, 2006 hi,[code] <?if ($loggedin == "true") { ?> <p><b><font size="5" color="#003470">Log in Successful! </font></b> <br><br>You are logged in as <b><?echo $_SESSION['sessionid'];?> </b>. <br>You will be redirected to the staff main page shortly. </b>.</p> <?header ("Refresh: 1; URL = staff-welcome.php"); } else { ?> <p><b><font size="5" color="#003470">Log in Failed! </font></b> <br><br>Invalid Staff ID and/or Password. <br>You will be redirected back to the login page shortly. </b>.</p> <?header ("Refresh: 1; URL = staff-login.php"); } ?>[/code]if i want to make:Administrator to go into staff-welcome1.phpEngineer to go into staff-welcome2.phpUser to go into staff-welcome3.phpwhat is the code that i have to use?is it..[code] <?if ($loggedin == "true") { ?> <p><b><font size="5" color="#003470">Log in Successful! </font></b> <br><br>You are logged in as <b><?echo $_SESSION['sessionid'];?> </b>. <br>You will be redirected to the staff main page shortly. </b>.</p> <? if($accessLvL == "Administrator") { header ("Refresh: 1; URL = staff-welcome1.php"); } if($accessLvL == "Engineer") { header ("Refresh: 1; URL = staff-welcome2.php"); } if($accessLvL == "User") { header ("Refresh: 1; URL = staff-welcome3.php"); } ?> } else { ?> <p><b><font size="5" color="#003470">Log in Failed! </font></b> <br><br>Invalid Staff ID and/or Password. <br>You will be redirected back to the login page shortly. </b>.</p> <?header ("Refresh: 1; URL = staff-login.php"); } ?>[/code]i think there's something wrong with the code. all the '<? and ?>' signs are making me headache...can anyone help me on this?thanks alot.. Link to comment https://forums.phpfreaks.com/topic/27198-about-links-again/ Share on other sites More sharing options...
Madatan Posted November 14, 2006 Share Posted November 14, 2006 where do you get the $accessLvL from? are you doing a database query to recieve that information?[code]"SELECT accesslvl FROM table_account WHERE id = '$_SESSION['sessionid']'[/code] Link to comment https://forums.phpfreaks.com/topic/27198-about-links-again/#findComment-124368 Share on other sites More sharing options...
hanwei Posted November 15, 2006 Author Share Posted November 15, 2006 hi. sorry for the late reply. my internet connection is down.thanks madatan. the $accessLvL is wrong. i should put $_SESSION['accesslvl'] instead of $accessLvL. thanks alot. Link to comment https://forums.phpfreaks.com/topic/27198-about-links-again/#findComment-124792 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.