After Checking Id
Code: Select all
while ($row = mysql_fetch_array($result1)) {
extract($row);
// set username into session vars
$_SESSION['logname'] = $loginname;
$_SESSION['auth'] = 'yes';
$_SESSION['userfname']=$fname;
$_SESSION['userlname']=$lname;
}
header("Location:https://www.todaysrancher.org/cgi-bin/mstrctrl.php");
exit();
Code: Select all
<?php
session_start();
if ($_SESSION['auth']=="yes") {
$User_first_name=$_SESSION['userfname'];
$User_last_name=$_SESSION['userlname'];
$user_name=$User_first_name." ".$User_last_name;
} else{
header("Location:https://www.todaysrancher.org/sorry2.html");
exit();
}
?>
Should I pass the original Session ID? and if so, what's the best method for doing so?
thanks