How to make a email form send copy?

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
Gollum_
Forum Newbie
Posts: 2
Joined: Thu May 22, 2003 3:57 pm

How to make a email form send copy?

Post by Gollum_ »

Hello!
First time in this forums...

I have a mail- form like the ordniary mail(), but if the one who send me a email want's a copy of it - how should i do that?

Is it possible to do this with a checkbox?

Thanks :)
User avatar
phice
Moderator
Posts: 1416
Joined: Sat Apr 20, 2002 3:14 pm
Location: Dallas, TX
Contact:

Post by phice »

Make sure they put in their email, and put in a checkbox on the form.

Code: Select all

<input type="checkbox" name="check_box" value="Yes">
From that, you'd do:

Code: Select all

<?php
if($_POST["check_box"] == "Yes")
  mail(); // Mail a copy to their address
?>
Hope this helps!
Image Image
Gollum_
Forum Newbie
Posts: 2
Joined: Thu May 22, 2003 3:57 pm

Post by Gollum_ »

Thanks for fast reply :D I works great now!
Post Reply