<?php
require "./Cart.php";

if (isset($AddBuy)) {
     $UserID = uniqid('', true);
     $sql =    'INSERT INTO Buyers (Name, Address1, Address2, City, State, Zip, DayPhone, EvePhone, Email, Pass, UserID) ' .
          "VALUES ('$bName', '$bAddress1', '$bAddress2', '$bCity', '$bState', '$bZip', '$bDayPhone', '$bEvePhone', '$bEmail', '$bPass', '$UserID')";
     mysql_query($sql);
     $BID = mysql_insert_id();
}

$sql =    "SELECT * FROM Buyers WHERE BuyerID = $BID";
$buyer = mysql_query($sql);
list($Name, $Address1, $Address2, $City, $State, $Zip, $Email, $DayPhone, $EvePhone) = mysql_fetch_row($buyer);
mysql_free_result($buyer);

adminHeader('','');

blueFont('Arial', "<b>$Name</b><br>$Address1<br>$Address2<br>$City $State, $Zip<br>Day Phone: $DayPhone<br>Evening Phone: $EvePhone<br><a href=mailto:$Email>$Email</a>");
fontFace("Arial","<br><br><A href=$PHP_SELF?topic=searchReceiptsResponse.php&BID=$BID>View Buyer Orders</a>");

adminFooter($Relative);
?>
