Jump to content

about links again..= =''


hanwei

Recommended Posts

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.php
Engineer to go into staff-welcome2.php
User to go into staff-welcome3.php

what 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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.