Website registration form + OptIn Box = How ?

10 replies
Hello Warriors,

I have a problem, that I can't solve and I need your help.

In a nutshell:

I have a website, where a visitor can sign up for a free account. At the same time, I want this user to be added to my autoresponder (just single opt-in), but using only the PHP form from my website.

The PHP code behind registration form is:
<form name="register" id="register" action="<?php echo osc_base_url(true); ?>" method="post" >
<input type="hidden" name="page" value="register" />
<input type="hidden" name="action" value="register_post" />

<fieldset>
<label for="name"><?php _e('Name', 'modern'); ?></label> <?php UserForm::name_text(); ?><br />
<label for="password"><?php _e('Password', 'modern'); ?></label> <?php UserForm::password_text(); ?><br />
<label for="password"><?php _e('Re-type password', 'modern'); ?></label> <?php UserForm::check_password_text(); ?><br />
<p id="password-error" style="display:none;">
<?php _e('Passwords don\'t match', 'modern'); ?>.
</p>
<label for="email"><?php _e('E-mail', 'modern'); ?></label> <?php UserForm::email_text(); ?><br />
<?php osc_run_hook('user_register_form'); ?>
<?php osc_show_recaptcha('register'); ?>
<button type="submit"><?php _e('Create', 'modern'); ?></button>
</fieldset>
Any ideas or tips ?

Thanks in advance.
#box #form #optin #registration #website
  • Profile picture of the author Brandon Tanner
    You should check with your autoresponder company first to make sure that you're allowed to do this, as I'm pretty sure that some of them do not allow that (automated submissions).

    But from a technical aspect... what you would have to do is add a POST request to the end of whatever script that your form's "action" goes to (the script that "osc_base_url" represents).

    This POST request would submit your subscriber's info to your autoresponder's "add lead" page. You can send a POST request via PHP using either "file_get_contents", or you can use CURL.

    See this page...

    http - How do I send a POST request with PHP? - Stack Overflow
    Signature

    {{ DiscussionBoard.errors[8744851].message }}
    • Profile picture of the author NeshSab
      Thank you, Brandon!

      I will try this method right away.

      GetResponse allow this. I contacted their team first and they were kind enough to give me a bunch of guides and codes (for developers only), but I can't figure it by myself.
      {{ DiscussionBoard.errors[8746604].message }}
  • Profile picture of the author mattchambers
    why don't you use PHP to create your own auto responder?
    Signature

    Add More Value To Your Email Lists with ConquerSMS

    {{ DiscussionBoard.errors[8746907].message }}
  • Profile picture of the author sk8tavou
    I do the same but i do it manually.
    When they agree for the terms they also agree to be added to my mailing list and every week i grab them all and put them in my list on Mailchimp.

    Its a solution but not if you are doing this in big scale!
    Signature
    SocialWarrior - Cheapest Social Marketing Services
    Just message me for greater discounts :)
    {{ DiscussionBoard.errors[8746940].message }}
    • Profile picture of the author NeshSab
      Originally Posted by sk8tavou View Post

      I do the same but i do it manually.
      When they agree for the terms they also agree to be added to my mailing list and every week i grab them all and put them in my list on Mailchimp.

      Its a solution but not if you are doing this in big scale!
      That's exactly what I do, but I want to automate the process. :rolleyes:

      mattchambers because I want to use GetResponse's newsletter templates and in general it's the easier way to do (for me at least).
      {{ DiscussionBoard.errors[8747244].message }}
  • Profile picture of the author Joe Crosbie
    What auto responder company are you using?

    I know you can do it fairly easily with Aweber so if anyone wants to know how I'll share the code below.

    Joe Crosbie,
    Signature
    I chose entrepreneurship over further education despite being laughed at by my friends and family..

    I recently hit the "RESTART" button on my life, read my personal blog to find out how I did it :)
    {{ DiscussionBoard.errors[8748901].message }}
    • Profile picture of the author Brandon Tanner
      Originally Posted by Joe Crosbie View Post

      I know you can do it fairly easily with Aweber
      FYI - Aweber doesn't allow that (not sure about any of the other autoresponder services though).

      From their service agreement page...

      A script must not be used to auto submit a web form subscriber on behalf of a website visitor.
      What you CAN do with Aweber though, is pre-populate an optin form with previously entered data... but ultimately, your website visitor has to click the "subscribe" button themselves.
      Signature

      {{ DiscussionBoard.errors[8749302].message }}
      • Profile picture of the author Joe Crosbie
        Originally Posted by Brandon Tanner View Post

        FYI - Aweber doesn't allow that (not sure about any of the other autoresponder services though).

        From their service agreement page...
        Agreed. However you can still automatically add them to the list, they'll just receive a confirmation email.

        They have the option to tick a box to decide whether they want to be added or not.
        Signature
        I chose entrepreneurship over further education despite being laughed at by my friends and family..

        I recently hit the "RESTART" button on my life, read my personal blog to find out how I did it :)
        {{ DiscussionBoard.errors[8750132].message }}
      • Profile picture of the author kevbo22
        Originally Posted by Brandon Tanner View Post

        FYI - Aweber doesn't allow that (not sure about any of the other autoresponder services though).
        Aweber has an api that will do this:
        https://labs.aweber.com/snippets/subscribers

        Just put the api code on your post page and the subscriber will be added.
        Signature

        The best path to prosperity is free market capitalism!

        {{ DiscussionBoard.errors[8750227].message }}
        • Profile picture of the author Brandon Tanner
          Interesting. I wonder why they state on their service agreement page that you can't use a script to auto submit a lead, then? Seems a bit contradictory.
          Signature

          {{ DiscussionBoard.errors[8752041].message }}

Trending Topics