This blog is about Graphic Design, Vector Art, and Cartoon Illustration BradHallArt.com


Contact page php trick that inserts email address when you hit "reply"


Here is a neat trick that will make life easier for you when you are replying to messages sent to you from your contact page. This bit of php will pick up the email address from the person who sent you the message and insert it in the reply-to in your email.

You will need to add two things to your php. This line $headers = 'From: '.$name_field.' <'.$email_field.'>' . "\r\n"; and you need to add $headers to your mail()function, like this mail($to, $subject, $body, $headers);

Enjoy!

Special thank you to James Webb at Multimediums.com for help on this!