Hi I am totally new to this forum, but have a question that I need help on, and I hope someone can point me in the right direction.
I am currently using PHP mail to send an email confirmation once a form is completed and submitted, however is it possible to also send this same form data to a url.
The url is already set up to handle the data, I just need the form once submitted to send the captured data to the URL as well as trigger the email confirmation.
Is this possible??
Thanks
Send Email Confirmation & Post to URL
Moderator: General Moderators
Re: Send Email Confirmation & Post to URL
Sure it is.
Code: Select all
<?php
if ($_POST['submit']) //they submitted the form
{
//generate and send the email
header("Location: yournewurl.com?field1=" . $_POST['field1'] . "&field2=" . $_POST['field2'] . "&field3=" . $_POST['field3']);
exit;
}
Re: Send Email Confirmation & Post to URL
Hi thanks for the reply, just to clarify, where you say
//generate and send the email
I have just to use the code I have at the moment to send the email?
Then after this is where the new code will go.
Thanks
//generate and send the email
I have just to use the code I have at the moment to send the email?
Then after this is where the new code will go.
Thanks