Help

Hi people!
I am new with PHP, very new. I downloaded a php file (formtoemail.com), but it doesn?t work , i uploaded to my-php.net, http://clandestino800.my-php.net/kontakt.htm this is the form, and it goes to http://formtoemail.com/FormToEmail.txt . I have two questions, why do i don?t receive the email to the address i wrote in the php, and i want to know if i should uploade something to the server. I read in the php that there must be something in the server PHP version 4.1.4 or higher, but i have no idea what that is.
HELP.

I wrote this script from the best of my knollege, It Works only because i tested it on my server


<div align="center">
<form action="send.php" method="post">
<fieldset>
<b>To Email:</b><input type="text" name="to_email"><br />
<b>To Name:</b><input type="text" name="to_name"><br />
<b>Your Email:</b><input type="text" name="your_email"><br />
<b>Your Name:</b><input type="text" name="your_name"><br />
<b>Subject:</b><input type="text" name="subject"><br />
<b>Message:</b><textarea name="messages"></textarea><br />
<input type="submit" name="submit" value="Send Email">
</fieldset>
</form>
</div>

save the above as email.php


<?php
$to=$_POST['to_email'];
$name_a=$_POST['to_name'];
$from=$_POST['your_email'];
$name_b=$_POST['your_name'];
$sub= "".$_POST['subject'].", From: $from";
$message=$_POST['messages'];
// Format Message
$mess="You have Recieved an Email From $fromnn";
$mess.="Senders Name: $name_bnn";
$mess.="Message:nn $messagenn";
// Mail Function
$mail= mail($to,$sub,$mess,"From: $from");
// If Message Sent
if ($mail) {
echo "Message Sent successfully to $name_a at $to";
// If Message Failed to Send
} else {
echo "Your Message Failed to Send! <a href="email.php">Click Here and Try Again</a>";
}
?>

Save the above as send.php

Hope this works for you

Sponsor our Newsletter | Privacy Policy | Terms of Service