Dear X10Hosting,
I'm trying to e-mail a form through the following simple "send_form_email.php" script:
<?php
$to = "ajnv60@ekijsa.x10hosting.com";
$subject = "Contact Us";
$email = $_REQUEST['email'] ;
$message = $_REQUEST['message'] ;
$headers = "From: $email";
$sent = mail($to, $subject, $message, $headers) ;
if($sent)
{print "Your mail was sent successfully"; }
else
{print "We encountered an error sending your mail"; }
?>
where the form input is collected through
<form method="post" action="send_form_email.php">
Name: <input name="name" type="text"><br>
<br>
E-mail: <input name="email" type="text"><br>
<br>
Message: <textarea name="message" rows="15" cols="40"></textarea> <br>
<br>
<input value="Submit" type="submit"> </form>
Entering form data runs smoothly, but when I hit the submit button the "send_form_email.php" script is shown and the e-mail is not sent.
Does this functionality work at X10Hosting, and if it does, can you please tell me what I'm doing wrong?
Thanks!


LinkBack URL
About LinkBacks
Reply With Quote

