Here you are master...
Code:
<?php
if($lastname == 'blanchatmfg' && $year == 'fire'){
header("Location: admin.php");
}else{
$strServer="mysql12.powweb.com"; // Server IP Address 'or' Name
$strDatabase="blanchatmfg"; // Database Name
$strUser="blanchatmfg"; // User ID
$strPwd="firetruck"; // Password
$strDB=mysql_connect($strServer,$strUser,$strPwd) or die(mysql_error());
session_start(); # START THE SESSION ***IMPORTANT***
$database=mysql_select_db($strDatabase,$strDB) or die(mysql_error());
$sql = "SELECT * FROM `Plow Customer Information` WHERE `LastName` = '$lastname' and `Year` = '$year'";
$rs = mysql_query($sql) or die(mysql_error());
$cr = mysql_num_rows($rs) or die(mysql_error());
if($cr > 0) {
$rows = mysql_fetch_assoc($rs) or die(mysql_error());
# register the fields as SESSION variables
# change the fields to your table
$_SESSION['firstname'] = $rows['FirstName'];
$_SESSION['lastname'] = $rows['LastName'];
$_SESSION['saddress'] = $rows['StreetAddress'];
$_SESSION['city'] = $rows['City'];
$_SESSION['state'] = $rows['State'];
$_SESSION['zip'] = $rows['Zip'];
$_SESSION['phone'] = $rows['Phone'];
$_SESSION['year'] = $rows['Year'];
$_SESSION['sn'] = $rows['SerialNumber'];
$_SESSION['descrip'] = $rows['Description'];
header("Location: infomaster.php");
exit();
} else {
header("Location: error.php");
exit();
}
}
?>
When I login now, I just get a plain blank page (good or bad)?
Bookmarks