MaRiOnI 0 Report post Posted January 14, 2005 CODE <? if($submit) //If submit is pressed { mail("youremailaddress@whatever.com", "$subject", "$email", "$comments"); } else {?> <form method='post' action='<? echo $PHP_SELF; ?>'> E-Mail: <INPUT TYPE='TEXT' NAME='email' size=60> Subject: <INPUT TYPE='TEXT' NAME='subject' size=60> Comments: <TEXTAREA NAME='comments' ROWS=10 COLS=30></TEXTAREA> <input type='submit' name='submit' value='submit'> </form> <? }?> Share this post Link to post Share on other sites
Belgian Lotus 0 Report post Posted January 16, 2005 I guess u forgot to take the variables from your POST-action...Put something like this before the mail-function.$email = $_POST["email"];$subject = $_POST["subject"];$comments = $_POST["comments]:$date = date("Y-m-d H:i");$body = "Email: " . $email . "Comments: " . $comments . "Date: " . $date . "This was send automatticaly."$mail = mail("yourmail@domain.com",$subject,$body,"From:$email"); Share this post Link to post Share on other sites
FaLgoR 0 Report post Posted January 17, 2005 I guess u forgot to take the variables from your POST-action... Put something like this before the mail-function. $email = $_POST["email"]; $subject = $_POST["subject"]; $comments = $_POST["comments]: $date = date("Y-m-d H:i"); $body = " Email: " . $email . " Comments: " . $comments . " Date: " . $date . " This was send automatticaly." $mail = mail("yourmail@domain.com",$subject,$body,"From:$email"); 41490[/snapback] it's not really needed, only if the register_blobals in php.ini is turned off (its not Xisto case). Every hosts turns it on. Share this post Link to post Share on other sites
FaLgoR 0 Report post Posted January 17, 2005 I've posted this code some days ago... check the topics and u'll find the same thing. Share this post Link to post Share on other sites