Code:
<?php
$yfname = filter_input(INPUT_POST, "zfname");
$ylname = filter_input(INPUT_POST, "zlname");
$yemail = filter_input(INPUT_POST, "zemail");
$yhome = filter_input(INPUT_POST, "zhome");
$ycell = filter_input(INPUT_POST, "zcell");
$ypartner = filter_input(INPUT_POST, "zpartner");
$ylevel = filter_input(INPUT_POST, "zlevel");
$yshirt = filter_input(INPUT_POST, "zshirt");
$yusta = filter_input(INPUT_POST, "zusta");
$ysignature = filter_input(INPUT_POST, "zsignature");
$yextras = filter_input(INPUT_POST, "zextras");
$yparty = filter_input(INPUT_POST, "zparty");
try
{
$connect = new PDO('mysql:host=localhost;dbname=lota_classic', "lota_mcolton", "lotatest");
$connect->setAttribute(PDO::ATTR_ERRMODE, PDO::ERRMODE_EXCEPTION);
$statement = $connect->prepare("INSERT INTO classic(firstname, lastname, email, homephone, cellphone, partner, level, USTA, shirt, party, extras, signature, entryfee)
VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?)");
$statement->execute(array($yfname, $ylname, $yemail, $yhome, $ycell, $ypartner, $ylevel, $yusta, $yshirt, $yparty, $yextras, $ysignature, $yentryfee));
$connect = null;
} // end try
catch(PDOException $e)
{
echo 'ERROR: ' . $e->getMessage();
}
$subject = "LOTA Classic Registration Form";
$to = "martyc@windstream.net";
$to2 = "$yemail";
$emailheader = "From: $yemail\n";
$message = "The following person has registered for the LOTA Classic.
Name: $yfname $ylname
Email Address: $yemail
Home Phone: $yhome
Cell Phone: $ycell
Partner: $ypartner
USTA Rating: $yusta
Level: $ylevel
T-shirt: $yshirt
Signature: $ysignature
Attending Dinner: $yparty
Extra Guests: $yextras
Entry Fee: $yentryfee";
$message2 = "Thank you for registering for the LOTA Classic.
Below is the information we received:
Name: $yfname $ylname
Email Address: $yemail
Home Phone: $yhome
Cell Phone: $ycell
Partner: $ypartner
USTA Rating: $yusta
Level: $ylevel
T-shirt: $yshirt
Signature: $ysignature
Attending Dinner: $yparty
Extra Guests: $yextras
Entry Fee: $yentryfee
Remember to send a check made out to LOTA to
Larry Kludt, Tournament Director
1030 Tailwater Unit B
Greensboro, GA 30642";
mail($to,$subject,$message,$emailheader);
mail($to2,$subject,$message2,$emailheader);
header("Location: index.htm");
?>
Bookmarks