HNX Posted December 8, 2007 Share Posted December 8, 2007 everything is ok but when i click submit it says it is received yet i dont receive anything <form action="send_mail.php" method="post" name="form1" id="form1"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="16%"><span class="style108">Subject</span></td> <td width="2%"><span class="style104">:</span></td> <td width="82%"><input name="subject" type="text" id="subject" size="50" /></td> </tr> <tr> <td><span class="style108">Message</span></td> <td><span class="style104">:</span></td> <td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td> </tr> <tr> <td><span class="style108">Name</span></td> <td><span class="style104">:</span></td> <td><input name="name" type="text" id="name" size="50" /></td> </tr> <tr> <td><span class="style108">Email</span></td> <td><span class="style104">:</span></td> <td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit" /> <input type="reset" name="Submit2" value="Reset" /></td> </tr> </table> </form> this is my code, i mean my form and this is the send_mail file <?php @extract($_POST); $name = stripslashes($name); $email = stripslashes($email); $subject = stripslashes($subject); $text = stripslashes($text); mail(' myemail@hotmail.com',$subject,$text,"From: $name <$email>"); echo("Thank you for your interest, your e-mail was sent."); ?> but i dont know why it doesn't work...... please help, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 erm... You might want to try <?php $name = $_POST['name']; $email = $_POST['customer_email']; $subject = $_POST['subject']; $detail = $_POST['detail']; if(isset($_POST['Submit'])){ $name = stripslashes($name); $email = stripslashes($email); $subject = stripslashes($subject); $text = stripslashes($text); mail(' myemail@hotmail.com',$subject,$text,"From: $name <$email>"); echo("Thank you for your interest, your e-mail was sent."); } else { echo "form was not submitted"; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 euh i should replace my "send_mail" file with ur codings???? i mean is that what ur sggesting..btw im a total noob with php ive just recently started learning it:D I Appreciate your "FREE" help, HNx(some dudes just sent me an email sayin ill do it if u pay...) Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 euh i should replace my "send_mail" file with ur codings???? i mean is that what ur sggesting..btw im a total noob with php ive just recently started learning it:D I Appreciate your "FREE" help, HNx(some dudes just sent me an email sayin ill do it if u pay...) ' Oh, I am terribly sorry my friend, I misunderstood your question. Is your problem not that your not receiving an email or what? edit: Don't pay, PHP help section is free, tell the moron to go away. Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 yes my problem is that i aint receiving any email when i fill my own contact form but i receive the message sayin ur message has been received Loll Dont worry i aint payin Lol, i deleted their mails and ignored them Loll (money aint easy to earn, so cant spend so fast Lol) Regards, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 yes my problem is that i aint receiving any email when i fill my own contact form but i receive the message sayin ur message has been received Loll Dont worry i aint payin Lol, i deleted their mails and ignored them Loll (money aint easy to earn, so cant spend so fast Lol) Regards, HNX try this, <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = "Hello! This is a simple email message."; $from = $_POST['name']; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } ?> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 ok dont go so fast with me cuz ur gonna confuse me Lol ok so u want me to replace my send mail with the codings u gave me??!!! Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 ok dont go so fast with me cuz ur gonna confuse me Lol ok so u want me to replace my send mail with the codings u gave me??!!! Replace that script I gave with the current one. Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 AIGHT!! ok imma try it right away Dude i LOVE you (If u were a women id MARRY YOU!!), HNX Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 yo dude thank you VERY much but there is one problem :s no matter what i write as a comment i the same message everytime!! :| : "Hello! This is a simple email message." Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 yo dude thank you VERY much but there is one problem :s no matter what i write as a comment i the same message everytime!! :| : "Hello! This is a simple email message." try this <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } ?> lol, I am glad to help you. I love it how I make people this happy, makes me happy Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 ok nice ill try it right away (again....) Lol but ill tell u what happens in an hour Lol i got some other shit to fix i just hope ull still be one Mr. Whatever your name is:D Thanks man, Thanks ALOT!!!! ur the best, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 8, 2007 Share Posted December 8, 2007 ok nice ill try it right away (again....) Lol but ill tell u what happens in an hour Lol i got some other shit to fix i just hope ull still be one Mr. Whatever your name is:D Thanks man, Thanks ALOT!!!! ur the best, HNX Names Joey. Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 JOEY!!!!!!!!!!!!!!!!! it works PERFECTLY!!!!!!!!!!!!!!!!!!! now isnt there a way to show the "received message thingy" in the same window???? cuz when i click on it to send it, a blank page comes and it says at the top that ur message has been received.... and instead i want only my contact page to change and let the website be. I mean i dont want it to go to a blank page Loll Thanks in advance, HNX(do u mind sharing emails?) Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 JOEY!! Now dont u leave me alone Like Sasuke Did With Naruto!! Lolll Quote Link to comment Share on other sites More sharing options...
HNX Posted December 8, 2007 Author Share Posted December 8, 2007 hey Sensei is it normal for you not replying ??? are you ok?? Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 10, 2007 Share Posted December 10, 2007 Hey buddy, Nah, it is normal for me not replying. I am currently training for my boxing match this week, I am in lightweight fighting this Brazilian kid. I am immensly busy my friend, so sorry for not being able to help. I will check out what you need, and post back here in a minute or so. Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 10, 2007 Share Posted December 10, 2007 Alright, I read your little demand and all you have to do is change the action of your form. I.E. <form action=".<?php echo $_SERVER['PHP_SELF']; ?>."></form> Now, put the script I just fixed for you on the contact page... edit: try this <?php if(isset($_POST['Submit'])){ $to = "YOUR HOTMAIL ADDRESS"; $subject = $_POST['subject']; $message = $_POST['detail']; $from = $_POST['name']; $headers = "From: $from"; mail($to,$subject,$message,$headers); echo "Thank you for your interest, your e-mail was sent."; } else { echo "form was not submitted"; } ?> <form action=".<?php echo $_SERVER['PHP_SELF']; ?>." method="post" name="form1" id="form1"> <table width="100%" border="0" cellspacing="1" cellpadding="3"> <tr> <td width="16%"><span class="style108">Subject</span></td> <td width="2%"><span class="style104">:</span></td> <td width="82%"><input name="subject" type="text" id="subject" size="50" /></td> </tr> <tr> <td><span class="style108">Message</span></td> <td><span class="style104">:</span></td> <td><textarea name="detail" cols="50" rows="4" id="detail"></textarea></td> </tr> <tr> <td><span class="style108">Name</span></td> <td><span class="style104">:</span></td> <td><input name="name" type="text" id="name" size="50" /></td> </tr> <tr> <td><span class="style108">Email</span></td> <td><span class="style104">:</span></td> <td><input name="customer_mail" type="text" id="customer_mail" size="50" /></td> </tr> <tr> <td> </td> <td> </td> <td><input type="submit" name="Submit" value="Submit" /> <input type="reset" name="Submit2" value="Reset" /></td> </tr> </table> </form> Quote Link to comment Share on other sites More sharing options...
HNX Posted December 11, 2007 Author Share Posted December 11, 2007 euh wait Lol i remove my previous form and put this instead and i keep the php file????? Oh and Good luck with ur boxing, and ur email aint workin and also how old r u??? Regards, HNX Quote Link to comment Share on other sites More sharing options...
phpSensei Posted December 11, 2007 Share Posted December 11, 2007 I am turning 17, and delete send_mail.php, and put the script i gave you where your FORM is for sending your email. Quote Link to comment Share on other sites More sharing options...
HNX Posted December 11, 2007 Author Share Posted December 11, 2007 I am turning 17, and delete send_mail.php, and put the script i gave you where your FORM is for sending your email. Fiuh!! Lol ur not 54!! or something like that Loll HAHAHAH aight ok imma delete send mail put ur scripts in my form and ill tell u if i have any other problems Quote Link to comment Share on other sites More sharing options...
HNX Posted December 11, 2007 Author Share Posted December 11, 2007 yo it tells me Not Found The requested URL /.< was not found on this server. Additionally, a 404 Not Found error was encountered while trying to use an ErrorDocument to handle the request. Apache/1.3.39 Server at mydoMAINEname.net Port 80 Quote Link to comment Share on other sites More sharing options...
marcus Posted December 11, 2007 Share Posted December 11, 2007 Is this when you submit the form, or viewing the form? Quote Link to comment Share on other sites More sharing options...
HNX Posted December 11, 2007 Author Share Posted December 11, 2007 when i submit the form Quote Link to comment Share on other sites More sharing options...
marcus Posted December 11, 2007 Share Posted December 11, 2007 Remove the periods around <?php echo $_SERVER['PHP_SELF']; ?> <form action="<?php echo $_SERVER['PHP_SELF']; ?>" method="post"> Quote Link to comment 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.