PhpRiot
Follow phpriot on Twitter
Sponsored Link

Listing 3722

Submitted by Yosef, 2 September 2010
<?php
if(isset($_POST['email'])) {
    
    // EDIT THE 2 LINES BELOW AS REQUIRED
    $email_to = "hours@taptutoring.com";
    $email_subject = "TAP-H $name";
 
    $tutor = $_POST['tutor']; // required
    $client = $_POST['client']; // required
    $subject = $_POST['subject']; // required
    $duration = $_POST['duration']; // not required
    $date = $_POST['date']; // required
    $notes = $_POST['notes']; // required
 
    $email_message = "Form details below.\n\n";
    
    function clean_string($string) {
      $bad = array("content-type","bcc:","to:","cc:","href");
      return str_replace($bad,"",$string);
    }
    
    $email_message .= "Tutor: ".clean_string($tutor)."\n";
    $email_message .= "Client: ".clean_string($client)."\n";
    $email_message .= "Subject: ".clean_string($subject)."\n";
    $email_message .= "Duration: ".clean_string($duration)."\n";
    $email_message .= "Date: ".clean_string($date)."\n";
    $email_message .= "Notes: ".clean_string($notes)."\n";
 
// create email headers
$headers = 'From: '.$email_from."\r\n".
'Reply-To: '.$email_from."\r\n" .
'X-Mailer: PHP/' . phpversion();
@mail($email_to, $email_subject, $email_message, $headers);  
?>
 
<!-- include your own success html here -->
<body topmargin="0" background="images/bg3.png" text="#000000">
<table cellpadding="0" cellspacing="0" align="center">
     <tr><td bgcolor="#FFFFFF" valign="top">
         <table cellpadding="3" cellspacing="3">
        <tr><td height="20" colspan="4" width="700"></td></tr>
        <tr><td>
        
        <p align="center">Hours Posted.</p>
<p align="center">
<a href= "http://www.taptutoring.com/login_success.php">Post Another Hour</a>
</p>
<p align="center">If you are not redirected automatically within a few
seconds then please click on the link above.</p>
<script type="text/javascript"><!--
setTimeout('Redirect()',4000);
function Redirect()
{
  location.href = 'login_success.php';
}
// --></script>
        
        </td></tr>
        </table>
     </td></tr>
     </table>
</body>
<?
}
?>
Submit a Follow Up