Submitting Form Information to Emma
Posted: Fri Feb 01, 2008 6:20 am
I don't know if anyone will be able to help me with this or not, but I'll give as much information as I can and hope for the best. I'm building a site that uses an HTML mailing service called Emma (or MyEmma). We are using a "custom" sign up form that they provide minimal information for. I've tried contacting their support but so far no response. The form itself is simple and basically it just goes to this address:
https://app.e2ma.net/app/view:RemoteSignup
I can send the form info there using that address as the "action" in the form and it successfully enters the new signup in their database. But, the visitor is then taken to a blank page at that site when that happens and a single digit code displays (1 if it was successful, 2 if it was not, etc.).
What I need to do is somehow get the browser to come back to our website and pass along the code so I can program the PHP page to display an acknowledgement based on the code.
I am somewhat PHP savvy, understand the basics and build quite a few basic PHP based pages and sites. However, this particular problem is new to me.
The only example they give is with PEAR's HTTP_Client package and we don't use that. Here's what it looks like:
So, my question is, is there a way to accomplish what I need to accomplish just using PHP and not using the PEAR extension?
Any help, guidance or suggestions would be very much appreciated. Thanks a lot.
Steve Wilkison
https://app.e2ma.net/app/view:RemoteSignup
I can send the form info there using that address as the "action" in the form and it successfully enters the new signup in their database. But, the visitor is then taken to a blank page at that site when that happens and a single digit code displays (1 if it was successful, 2 if it was not, etc.).
What I need to do is somehow get the browser to come back to our website and pass along the code so I can program the PHP page to display an acknowledgement based on the code.
I am somewhat PHP savvy, understand the basics and build quite a few basic PHP based pages and sites. However, this particular problem is new to me.
The only example they give is with PEAR's HTTP_Client package and we don't use that. Here's what it looks like:
Code: Select all
require_once("HTTP/Client.php");
$emma_client = new HTTP_Client();
$emma_client->setMaxRedirects(20);
// POST should be filtered appropriately
$_POST['emma_account_id'] = '2975';
$_POST['signup_post'] = '24863';
$_POST['username'] = '**username**';
$_POST['password'] = '**password**';
$_POST['group'][5376249] = 1;
$_POST['emma_member_name_first'] = 'Bob';
$_POST['emma_member_email'] = 'bob@smith.com';
$emma_client->post("https://app.e2ma.net/app/view:RemoteSignup", $_POST);
$response_code = $emma_client->currentResponse();Any help, guidance or suggestions would be very much appreciated. Thanks a lot.
Steve Wilkison