0

My PHP code :

<?php
// variables to receive value from my form below
$to=$_POST['to'];
$subject=$_POST['subject'];
$message=$_POST['message'];
$from="exp@example.ccom";
$header="recevide from".$from;

// the condition to do if i click on submit input
if($_POST['sub']){
    mail($to,$subject,$message,$header);
    echo "Your message is successfully sent !!";
} else {
    echo "noway what fuck !!!";
}
?>
// form section (simple form)
<form action="<?php echo $PHP_SELF; ?>" method="post"> 
    <p> Send To :</p><input type="text" name="to" />
    <p>Subject :</p><input type="text" name="subject"/>
    <p>Message : </p><textarea name="message" cols="30" rows="15" > </textarea>
    <p><input type="submit" name="sub" value="Send Message"/></p>
</form>
Community
  • 1
  • 1
json25
  • 151
  • 1
  • 3
  • i've already uploaded this page php on my server Linux , when i click on (submit) input the message successfully sent but when check out my email box i didn't found the massage – json25 Feb 19 '16 at 21:46
  • Take a look at the answers at http://stackoverflow.com/questions/24644436/php-mail-form-doesnt-complete-sending-e-mail. Maybe one of these answers can solve your problem?! – John Slegers Feb 19 '16 at 21:47

0 Answers0