Solved

Send registration form to multiple address'

Posted on 2011-09-20
2
263 Views
Last Modified: 2012-05-12
I have set up a registration form which works fine. Currently though it only sends a confirmation to the user, I would also like an email sent to admin registration@domain.com.

Any ideas how to do this?

I have attached the code which applies to sending the user email...

// Send the email:
				$body = "Thank you for registering at <whatever site>. To activate your account, please click on this link:\n\n";
				$body .= BASE_URL . 'activate.php?x=' . urlencode($e) . "&y=$a";
				mail($trimmed['email'], 'Registration Confirmation', $body, 'From: registration@anjoman.co.uk');

Open in new window

0
Comment
Question by:BrighteyesDesign
2 Comments
 
LVL 9

Accepted Solution

by:
ghodder earned 500 total points
ID: 36570297
You just need to concatenate your second email address into the first parameter, prefixed with a comma like so

 mail($trimmed['email'] . ', registration@domain.com', 'Registration Confirmation', $body, 'From: registration@anjoman.co.uk');

Open in new window

0
 

Author Closing Comment

by:BrighteyesDesign
ID: 36572152
Perfect, thanks
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Password hashing is better than message digests or encryption, and you should be using it instead of message digests or encryption.  Find out why and how in this article, which supplements the original article on PHP Client Registration, Login, Logo…
This article discusses how to create an extensible mechanism for linked drop downs.
The viewer will learn how to look for a specific file type in a local or remote server directory using PHP.
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

832 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question