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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.