Xocyl Posted June 20, 2007 Share Posted June 20, 2007 Alright, so I am a PHP newbie, just started today! I have been learning for the past 4 hours though, so most of the terms you tell me I will understand. Now I will cut to the chase. I am writing a comment email form (as you would see if you were submitting a bug) Where all you do is type in your email and the message and then the form action sends you to my sendEmail.php with POST. I will get both files set up on here, but I need to know why I am not receiving the test email's I have sent ??? Submit Comment <html> <head> <title>PHP</title> </head> <body> <fieldset> <legend><b>E-Mail Form</b></legend> <form action="sendMail.php" method="post"> E-Mail: <br /> <input type="text" name="from" /> <br /> Message: <br /> <textarea cols="40" rows="15" name="message"></textarea> <br /> <input type="submit" value="Send"/> </form> </fieldset> </body> </head> sendMail.php <html> <head> <title>PHP welcome!</title> </head> <body> <center> <?php $message=$_REQUEST['message']; $from=$_REQUEST['from']; $to="casemyster@gmail.com"; $subject="Comment PHP"; mail( $to, "Subject: $subject", $message, "From: $from" ); echo "Mail Successfully Sent."; ?> <br /> <a href="phptest.php">Send Another</a> </center> </body> </html> Quote Link to comment https://forums.phpfreaks.com/topic/56472-email-form-help/ Share on other sites More sharing options...
Xocyl Posted June 20, 2007 Author Share Posted June 20, 2007 Just testing my new picture and such... Quote Link to comment https://forums.phpfreaks.com/topic/56472-email-form-help/#findComment-278904 Share on other sites More sharing options...
teng84 Posted June 20, 2007 Share Posted June 20, 2007 where do you run the script? is there an errors? ASTIG!!! Quote Link to comment https://forums.phpfreaks.com/topic/56472-email-form-help/#findComment-278905 Share on other sites More sharing options...
Xocyl Posted June 21, 2007 Author Share Posted June 21, 2007 I run the script's on Apache, on my local machine (http://localhost/) and I have had past script's work but when I make an error it does not give me an error message. ever. It just turns white and nothing appears on the screen during runtime :-\ Quote Link to comment https://forums.phpfreaks.com/topic/56472-email-form-help/#findComment-278969 Share on other sites More sharing options...
teng84 Posted June 21, 2007 Share Posted June 21, 2007 ASTIG!! you cant run the mail function on localhost but i heard you can have a software installer that allows you to use mail function on the INTRANET. But if you have the domain its not gonna be a prob. Quote Link to comment https://forums.phpfreaks.com/topic/56472-email-form-help/#findComment-278991 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.