$host, 'auth' => false)); if (isset($p['cmdReserve'])) { $sendChecker = false; $errMessage = ""; $msg = ""; $fullName = $p['txtFullName']; $howMany_anoos = $p['txtHowMany_anoos']; $howMany_madras = $p['txtHowMany_madras']; $conPhone = $p['txtContactPhone']; $emailAddress = $p['txtEmailAddress']; $time_madras = $p['txtTime_madras']."-".$p['sel_madras']; $kidsUnderFive = $p['txtKidsUnder5']; $kids5to10 = $p['txtKids5to10']; $chairBooster = $p['chairBooster']; $pDate = $p['txtDate']; if( $emailAddress!="" && $fullName!="" ) { $whr="Email='$emailAddress'"; $chkAvailability=$databaseConnect->getRecord('maillist','id',$whr,'id desc '); if( sizeof($chkAvailability) ==0 ) { $cols="Name,Email"; $vals="'$fullName','$emailAddress'"; $insertAcctInfo= $databaseConnect->insertRecord('maillist',$cols,$vals); } //High chair/booster $event = "Friday Dinner Special"; $subject = "Dinner Reservation Request"; $messageTemp = "Dinner Reservation Request\n"; $messageTemp .= "----------------------------------------------------\n"; $message = ""; $message .= "\r\nReservation Number: ".$randomNumber; $message .= "\r\nFullname: ".$fullName; $message .= "\r\nTelephone: ".$conPhone; $message .= "\r\nEmail Address: ".$emailAddress; $message .= "\nDate: $pDate"; $message .= "\nTime of arrival: $time_madras\n"; $message .= "\nHow many in the party: ".$howMany_madras; $message .= "\r\nKids under five: ".$kidsUnderFive; $message .= "\r\nKids five to ten: ".$kids5to10; $message .= "\r\nHigh chair/booster: ".$chairBooster; /*$toContact = "a_param@yahoo.com";*/ $headers = array ('MIME-Version' => "1.0", 'Content-type' => "text/plain; charset=iso-8859-1;", 'From' => $fromEmail, 'To' => $toContact, 'Subject' => $subject); $adminMail = $smtp->send($toContact, $headers, $messageTemp."".$message); if (PEAR::isError($adminMail)) { $errMessage = "Sorry, failed to send your message to Madras Cafe. Please try again later."; }else{ $clientSubject = "Dinner Reservation Confirmation"; $clientMsg = "\r\nHi,"; $clientMsg .= "\r\n\r\nYour Dinner Reservation has been made. The reservation details are as follows,"; $clientMsg .= "\r\n---------------------------------------------------------------------------------------------------------- "; $clientMsg .= $message; $clientMsg .= "\r\n---------------------------------------------------------------------------------------------------------- "; $clientMsg .= "\r\n\r\nWe look forward to seeing you for Dinner."; $clientMsg .= "\r\n\r\nThank you"; $clientMsg .= "\r\nMadras Cafe Team"; $clientMsg .= "\r\nMadras Fine Dining & Banquet Catering"; $clientMsg .= "\r\n1434 S Powerline RD."; $clientMsg .= "\r\nPompano Beach FL. 33069"; $clientMsg .= "\r\n1-954-977-5434 (Office)"; $clientMsg .= "\r\n1-954-818-0217 (Mobile)"; $clientMsg .= "\r\ncontact@madrascafe.net"; $clientMsg .= "\r\nwww.madrascafe.net"; $custHeaders = array ('MIME-Version' => "1.0", 'Content-type' => "text/plain; charset=iso-8859-1;", 'From' => $fromEmail, 'To' => $emailAddress, 'Subject' => $clientSubject); $customerMail = $smtp->send($emailAddress, $custHeaders, $clientMsg); $msg = " Successfully completed your reservation."; $reservCols = "email,event_name,details"; $reservVals = "'$emailAddress','$event','$message'"; $insertReservInfo= $databaseConnect->insertRecord('reservation',$reservCols,$reservVals); } } } ?>
  
Reservation Form

Your reservation has been made. We look forward to seeing you for Dinner.
Full name: *
Contact telephone: *
Email Address: *
Date:  Enter Date
(MM/DD/YYYY)
Time of arrival:   
How many in the party: 
Kids under five: 
Kids five to ten: 
High chair/booster: