Cheat Engine Forum Index Cheat Engine
The Official Site of Cheat Engine
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


My new contact form

 
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development
View previous topic :: View next topic  
Author Message
Lyfa
The Lonely Man
Reputation: 12

Joined: 02 Nov 2008
Posts: 744

PostPosted: Sat Apr 24, 2010 1:08 pm    Post subject: My new contact form Reply with quote

Any suggestions? - http://quinnheagy.org/contact.php

Code is:
Code:
<head>
<title>Contact Quinn Heagy: Contact Form</title>
<link type="text/css" rel="stylesheet" href="css/main.css" />
</head>
<body>
<?php
if (isset($_POST['submit'])){
   if(empty($_POST['email'])){
      echo "Please enter an email";
   } elseif (empty($_POST['subject'])){
      echo "Please enter a subject";
   } elseif (empty($_POST['message'])){
      echo "Please enter a message";
   } elseif ($_POST['message'] == "Enter your message here..") {
      echo "Please enter an original message";
   } else {
      require_once('recaptchalib.php');
$privatekey = "...";
$resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

if (!$resp->is_valid) {
  die ("The reCAPTCHA wasn't entered correctly. Go back and try it again." .
       "(reCAPTCHA said: " . $resp->error . ")");
}

      $message = "From: $_POST[email]\nIP: $_SERVER[REMOTE_ADDR]\nMessage: ";
      $subject = "QuinnHeagy.org Contact Form: ";
      $subject .= trim(strip_tags($_POST['subject']));
      $message .= trim(strip_tags($_POST['message']));
      if (mail("[email protected]" , $subject , $message , "[email protected]")) {
         echo '<script>document.location.href = "sent.php";</script>';
      } else {
         echo "There was an error.  Your message was not sent.  <a href='/contact.php'>Go back</a> and resend it";
      }
   }
      
} else {
?>
<form method="POST" action="contact.php">
Email: <input type="text" name="email" />
Subject: <input type="text" name="subject" /><br />
<textarea rows="4" cols="50" name="message" >Enter your message here..</textarea><br />
<center><?php
require_once('recaptchalib.php');
$publickey = "..."; // you got this from the signup page
echo recaptcha_get_html($publickey);
?></center>
<input type="submit" value="Send message" /> &bull; <input type="reset" value="Reset" /><br />
<input type="hidden" name="submit" value="true" />
</form>
<?php
}
?>
</body>

_________________
Back to top
View user's profile Send private message
Womanizer
Grandmaster Cheater
Reputation: 2

Joined: 30 May 2009
Posts: 958

PostPosted: Sun Apr 25, 2010 12:09 pm    Post subject: Reply with quote

Looks nice (;

Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    Cheat Engine Forum Index -> Web Development All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group

CE Wiki   IRC (#CEF)   Twitter
Third party websites