Login Register


[HELP] Website Functions! filter_list
Author
Message
RE: [HELP] Website Functions! #18
This is the (near) exact code I've used:

mail.htm
Code:
<form method="post" name="contact" id="contact" action="send.php"> <table> <tr> <td>Your Email Address</td> <td><input type="text" name="email"></td> </tr> <tr> <td>Subject</td> <td><textarea type="text" name="subject"></textarea></td> </tr> <tr> <td>Your Message</td> <td><textarea type="text" name="message"></textarea></td> </tr> <tr> <td><input type="submit" value="Submit" /></td> </tr> </table> </form>

send.php
Code:
<?php $mail = $_POST['email']; $to = '[CENSORED]'; $subject = 'Contact Form:' . $_POST['subject']; $message = $_POST['message']; $headers = 'From: ' . $mail . "\r\n" . 'Reply-To: ' . $mail . "\r\n" . 'X-Mailer: PHP/' . phpversion(); mail($to, $subject, $message, $headers); echo $to . " " . $subject . " " . $message . " " . $headers; ?>

and that is functional, and sending me emails. Obviously, I've removed mine, but it's a LIVE.com email, so if it works there, it should work for you.

For you, I imagine your if-else might be an issue. Either that, or you forgot to rename the fields in your form to match the PHP.
Stick with something simple like mine, and work SLOWLY towards what you want.

Also, this WILL end up in your spam folder, so make sure you check out that it's not an issue with that.

Edit;
Your code works fine, as long as the field names match.
It's also possible that your server has disallowed mailing for some reason, but I'm leaning towards the field thing, considering you seem to have a little trouble understanding how to properly use POST.
[Image: tumblr_m73y8go3jd1rb7u8co1_500.gif]
Avatars are for faggots.






Messages In This Thread
[HELP] Website Functions! - by Eclipse - 12-15-2013, 01:36 PM
RE: [HELP] Website Functions! - by Equinox - 12-15-2013, 01:58 PM
RE: [HELP] Website Functions! - by TechSaavy - 12-15-2013, 02:02 PM
RE: [HELP] Website Functions! - by Equinox - 12-15-2013, 02:02 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 02:09 PM
RE: [HELP] Website Functions! - by Equinox - 12-15-2013, 02:20 PM
RE: [HELP] Website Functions! - by TechSaavy - 12-15-2013, 02:25 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 03:56 PM
RE: [HELP] Website Functions! - by TechSaavy - 12-15-2013, 04:09 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 05:36 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 06:40 PM
RE: [HELP] Website Functions! - by Anizeb - 12-15-2013, 07:02 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 07:17 PM
RE: [HELP] Website Functions! - by Anizeb - 12-15-2013, 07:26 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 07:27 PM
RE: [HELP] Website Functions! - by Anizeb - 12-15-2013, 07:35 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 07:47 PM
RE: [HELP] Website Functions! - by Anizeb - 12-15-2013, 08:05 PM
RE: [HELP] Website Functions! - by Eclipse - 12-15-2013, 08:16 PM
RE: [HELP] Website Functions! - by Anizeb - 12-15-2013, 08:26 PM
RE: [HELP] Website Functions! - by Eclipse - 12-17-2013, 10:42 PM
RE: [HELP] Website Functions! - by Anizeb - 12-17-2013, 10:48 PM
RE: [HELP] Website Functions! - by Eclipse - 12-17-2013, 10:55 PM
RE: [HELP] Website Functions! - by Anizeb - 12-17-2013, 10:59 PM
RE: [HELP] Website Functions! - by Eclipse - 12-17-2013, 11:16 PM
RE: [HELP] Website Functions! - by Anizeb - 12-17-2013, 11:28 PM
RE: [HELP] Website Functions! - by Eclipse - 12-17-2013, 11:31 PM
RE: [HELP] Website Functions! - by Cake - 01-05-2014, 10:00 PM
RE: [HELP] Website Functions! - by Equinox - 01-05-2014, 10:21 PM
RE: [HELP] Website Functions! - by Cake - 01-05-2014, 10:25 PM
RE: [HELP] Website Functions! - by Equinox - 01-05-2014, 10:26 PM
RE: [HELP] Website Functions! - by Cake - 01-05-2014, 10:31 PM
RE: [HELP] Website Functions! - by Equinox - 01-05-2014, 10:32 PM
RE: [HELP] Website Functions! - by Anizeb - 01-05-2014, 10:39 PM
RE: [HELP] Website Functions! - by Eclipse - 01-05-2014, 11:34 PM



Users browsing this thread: 1 Guest(s)