I have a set of html and php pages which requires a user to login with a valid username and password before they are brought to a data entry screen. Once logged in a session is registered for the data entry page, and the following code is at the begining of the page:
Code: Select all
<?php
session_start();
if(!session_is_registered(myusername)){
header("location:main_login.html");
}
?>
The code that did work is:
Code: Select all
<label for ="loginname" style = "font-weight: bold;"> Currently logged in as: </label>
<input type = "text" name = "loginname" value = "<?php echo $myusername?>" style="background-color:transparent; border:0px solid white; color:#0000FF; font-weight:bold;" readonly = "readonly">
Thanks very much,
Kev