RE: [HELP] Website Functions! 12-15-2013, 07:17 PM
#13
(12-15-2013, 07:02 PM)Anizeb Wrote: There are a number of things wrong here.
andCode:<td><input type="text" name="email"></td>
Code:<td><textarea type="text" name="message">
are the two things you need to snatch from the orm you've got. You should also include a subject field, or a name one as CamIce seems to have implied. (I've done so below)
So what you want (combining both you and CamIce's code) would be
Code:<form method="post" name="contact" id="contact"> <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>
Code:<?php $mail = $_POST['email']; $to = 'cbc-chat@hotmail.com'; $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); ?>
Untested, and it's been ages since I've used PHP, so I may have fucked up. Sorry in advance, if that's the case.
Thanks! I'll try it now and post results.
EDIT:
Hmm, it seems some of the fields don't link.














![[+]](https://sinister.ly/images/modern/collapse_collapsed.png)