Hi there,
I have a simple form online set up to email contact info and and some selections to an inbox. Simple enough. I now want the back end php code that emails me that info to also send my email marketing account the contact information. I was told to look into cURL, which I have been, and can't seem to figure it out.
I get all the field names and place them into variables. I was given the string in the variable $url to use in order to send the info to our email lists. I tried using the code below but it didn't work. I'm having a hard time understanding how to use cURL and was curious if anyone could shed some light.
Many thanks to anyone with answers.
$EmailFrom = Trim(stripslashes($_POST['fields_email']));
$FirstName = Trim(stripslashes($_POST['fields_fname']));
$LastName = Trim(stripslashes($_POST['fields_lname']));
$Street1 = Trim(stripslashes($_POST['fields_address1']));
$Street2 = Trim(stripslashes($_POST['fields_address2']));
$City = Trim(stripslashes($_POST['fields_city']));
$State = Trim(stripslashes($_POST['fields_state']));
$Zip = Trim(stripslashes($_POST['fields_zip']));
$Country = Trim(stripslashes($_POST['fields_country']));
$url = "https://app.email.com/icp/signup.php?fields_email&fields_fname&fields_lname&fields_address1&fields_address2&fields_city&fields_state&fields_zip&fields_country&listid=XXXXXX&specialid:XXXXXX=SCCG&clientid=XXXXXX&formid=XXXX&reallistid=1&doubleopt=0&redirect=http://www.email.com/www/signup/thanks.html&errorredirect=http://www.email.com/www/signup/error.html";
$ch = curl_init();
curl_setopt($ch,CURLOPT_URL,$url);
$result = curl_exec($ch);
curl_close($ch);