2

I'm developing a page on my site for vistor's to subscribe to a newsletter and I want to return a message if they are already subscribed.

It's a standard html form like the example on http://help.exacttarget.com/en-US/documentation/exacttarget/subscribers/web_collect/#Code_Samples

<form class="newsletter-form" action="http://cl.exct.net/subscribe.aspx?lid=" name="subscribeForm" method="post" onsubmit="return checkForm();">
        <input type="hidden" name="thx" value=""> 
        <input type="hidden" name="err" value="">
        <input type="hidden" name="usub" value="">
        <input type="hidden" name="MID" value="">
        <input type="hidden" name="subAction" value="sub_add_update" checked="checked">
        <input type="hidden" name="Email Type" value="HTML" checked="checked">
        <input type="email" name="Email Address" required="required">
        <button type="submit">Sign Up</button>
    </form>

Both the success and error url will take the visitor back to the form page.

From what I understand I can get the error codes with php like in the examples page for parsing errors in php.

 <?php 
        $errorcode = $_GET["errorcode"];
        $errorcontrol = $_GET["errorControl"];

        switch($errorcode) {
            case "8" : echo 'it looks like you're already a subscriber';
 }

I'm testing this code by subscribing with an email address that has already been added to the email list. It should return the message that i'm already subscribed but it isn't. If i'm not mistaken the http://cl.exct.net/subscribe.aspx file should pass errors, otherwise how would the Error parsing PHP example work?

1
  • After Reading up on the problem I've discovered that the error parsing is only part of the Exact Target Landing Pages which are pages hosted on the Exact Target server. error parsing like this cannot be done with php on a website, it has to be done through the API. Commented May 29, 2014 at 13:18

1 Answer 1

2

After Reading up on the problem I've discovered that the error parsing is only part of the Exact Target Landing Pages which are pages hosted on the Exact Target server. error parsing like this cannot be done with php on a website, it has to be done through the API.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .