Hello,

How can I send the form results to the person who fills it out. Currently, I am having it sent to me.

//The email address the message will be sent to
$youremail = "ttttt@ttttt.com";

<?

//Checks to see if the name field is empty. You can delete or add fields as needed.

 if ( (!empty($name)))
 {

  $name = stripslashes($name);
  $message = stripslashes($message);
//This is where the email is sent using your values from above.
  mail("$youremail", "$subject","$thetext");
?>

Hi.

You could simply have him enter his email address and try sending it there.

Like:

<pre>
<?php
if(isset($_POST['email'])) {
  $usEmail = $_POST['email'];
  $usSubject = $_POST['subject'];
  $usMessage = $_POST['message'];

  if(mail($usEmail, $usSubject , $usMessage )){
    echo "Email sent!";
  }
  else {
    echo "Failed to send email!";
  }
}
?>
</pre>
<form action="?" method="post">
  Email: <input type="text" name="email" /><br />
  Subject: <input type="text" name="subject" /><br />
  Message: <textarea name="message"></textarea><br />
  <input type="submit" value="Send" />
</form>
Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.