<?
if (!$firstName or !$lastName or !$address or !$city or !$state)
{header("Location:makenewcall.php");
exit();
}
else
if ($firstName and $lastName and $address and $city and $state)
{
$conn=mysql_connect("localhost", "root", "") or die("Err:Conn");
$rs=mysql_select_db("filing", $conn) or die("Err:DB");
$sql="insert into calls (firstname, lastname, address, city, state, zipcode, side, work) values ($firstName, $lastName, $address, $city, $state, $zipcode, $side, $work)";
$rs=mysql_query($sql,$conn);
if($rs){ echo("Record added for: $firstName $lastName");}
}
echo($sql);
?>