Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <form name="contact" method="POST" action="enquiryForm.php">
- <p><b>Name</b><br>
- </tr>
- <tr>
- <input type="text" name="Name" size=40>
- </tr>
- <tr>
- <p><b>Your Email</b><br>
- </tr>
- <tr>
- <input type="text" name="email" size=40>
- </tr>
- <tr>
- <p><b>Company</b><br>
- </tr>
- <tr>
- <input type="text" name="Company" size=40>
- </tr>
- <tr>
- <p><b>Subject</b><br>
- </tr>
- <tr>
- <input type="text" name="subject" size=40>
- </tr>
- <tr>
- <p><b>Message</b><br>
- </tr>
- <tr>
- <textarea cols=40 rows=10 name="message"></textarea>
- </tr>
- <tr>
- <p><input type="submit" value=" Send ">
- </tr>
- </form>
- </div>
- <?php
- $to="info@projectrefresh.net"; // what email address do you wish the email to be sent to?
- $subject="Enquiry from website"; // what subject do you want the email to have
- $sendto="thankyou.html"; // where do you want the visitor to be sent to afterwards?
- //
- // This is an UNSUPPORTED web form to email PHP script for usage by DiYhost.co.uk customers
- //
- $message = "This message has been sent from ".$_SERVER['HTTP_HOST']."nnn";
- while(list($var, $val)=each($HTTP_POST_VARS)){ // Get all variables
- $message .= "[".$var."]: ".$val."nn"; // build the message body
- }
- $message .= "nnThe person's IP address who sent this email is: ".$_SERVER['REMOTE_ADDR'];
- // see http://www.php.net/manual/en/function.mail.php
- mail($to, $subject, $message,
- "From: webmaster@".$_SERVER['SERVER_NAME']."rn"
- ."Reply-To: webmaster@".$_SERVER['SERVER_NAME']."rn"
- ."X-Mailer: PHP/" . phpversion());
- // see http://www.php.net/manual/en/function.header.php
- header("Location: http://".$_SERVER['HTTP_HOST']
- .dirname($_SERVER['PHP_SELF'])
- ."/".$sendto);
- ?>
- <a href="index.html">Home</a>
- <a href="/index.html">Home</a>
- header("Location: $sendto");
- echo $_SERVER['HTTP_HOST'];
- echo $_SERVER['PHP_SELF'];
- echo dirname($_SERVER['PHP_SELF']);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement