From 14a81a74250ea717b46e503fdd75b907f97a1411 Mon Sep 17 00:00:00 2001 From: kake26 Date: Tue, 4 Jan 2022 15:36:07 -0600 Subject: [PATCH] intial code commit --- contactform.php | 94 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 94 insertions(+) create mode 100644 contactform.php diff --git a/contactform.php b/contactform.php new file mode 100644 index 0000000..bbac22d --- /dev/null +++ b/contactform.php @@ -0,0 +1,94 @@ +test_input($_POST["fname"]); + $lname = $this->test_input($_POST["lname"]); + $email = $this->test_input($_POST["email"]); + $comments = $this->test_input($_POST["comments"]); + // compile cleaned message + $msg = "From $fname Subject $lname email $email with message $comments"; + mail($target,"Website Form Submission",$msg); + } + + public function do_tests(){ + $this->fromtest(); + $this->ratetest(); + $result = $this->traptest(); + if($result == 3) { + $this->sndmsg("you@yoursite.com"); + return 3; + }else{ + return 0; + } + + } + +} + +$lcheck = new antibot(); + +$winner = $lcheck->do_tests(); + +if ($winner == 3){ + echo "Form Submitted thank you!"; +}else{ + echo "Error: Send failed, please try again."; +} + +?>