say if I had this to log in
<? if ($action == "login") {
if ($username == "admin" || $password == "admin") {
setcookie("admin", "loggedin", "+3600");
header('Location: admin.php');
} else { echo "wrong password";
}
} elseif ($action == "logout") {
setcookie("admin", "", "-3600");
header('Location: admin.php'); }?>
then I had this
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HEAD><TITLE>Snewz WMS</TITLE><META content="MSHTML 5.00.2614.3500" name=GENERATOR></HEAD>
<BODY aLink=#000000 bgColor=#ffffff link=#000000 text=#000000 vLink=#000000>
<?
if($admin == "loggedin") { ?>
etc etc
how would I get the username from the person loging in.
Say would I go <?
if($admin == "loggedin") {
echo "welcome $username";?>
would that then diplay the username of that person on the page where ever I put welcome username.
Also how would I make my login script more secure?
thanks