How to add subscription/unsubscription to existing forms

 

Archive

Search

This can be done in several ways, however the best and easiest way is to follow these steps:

  1. Download cHTTP class and upload it to the same folder with your existing form page.
  2. Add the following PHP code to your form processing code:


<?php

include("cHTTP.php");

$ObjectHTTP = new cHTTP();
$ObjectHTTP->clearFields();

// $ListID represents the ID number of the target mail lsit
$ObjectHTTP->addField('FormValue_MailListIDs[0]', $ListID);

// $Email represents the email address of the person
$ObjectHTTP->addField('FormValue_Email', $Email);

// Make the POST request
$ObjectHTTP->postPage("http://www.yourdomain.com/oempro/subscribe.php");

?>

You can repeat this code several times in your existing PHP code.

18th Aug 2007, Posted by Posted by Cem Hurturk under Filed under Website Integration Comments

3 Responses to “How to add subscription/unsubscription to existing forms”

  1. Marc Deinum, September 20th, 2007

    Hi,

    1. I download this cHTTP.php class. Upload it to the website directory where the page with the form resides.
    2. I copy/paste the script above, change this part of the script http://www.yourdomain.com/oempro/subscribe.php and where do I implement this script?
    This is not clear to me …

    Please explain.

    Thanks,
    Marc

  2. Marc Deinum, September 20th, 2007

    Hi Again,

    Thought I explain things a bit better …

    > Add the PHP code to your form processing code

    Which code is this … the cHTTP.php file, the subscripe.php file or my file with the form ?

    Do I need to change anything to the cHTTP.php file?

    Regards,
    Marc

  3. Cem Hurturk, September 25th, 2007

    Hi Marc,

    Let’s say you have a contact or sign-up form which accepts members to your website. And you want to integrate Oempro’s subscription module to this process. You want to subscribe your new website memebrs to Oempro’s one of the mail list as well.

    You just copy & paste the code written above to the correct place of your website contact/sign-up PHP code. In this way, visitors who contact you through your website form will also be subscribed to Oempro.

    Let me know if there is anything unclear.

Leave a Reply

 

Stay In Touch

In order to get notified about special opportunities, new free templates, white papers, gifts and new releases, please enter your email address:

Newsletter Subscription

You can also subscribe to our RSS feed to learn about now products being developed, what's going on at Octeth and latest news.

Blog RSS feed