Update AWeber list upon PHP/MySQL form submission...

3 replies
Hi

On my site I would like a form with fields like name, location, mobile number, email address etc.

Upon submission, I would like the email field to update to an AWeber list, as well as updating a MySQL table. So do two things in one submission.

How possible/easy is this?

Thanks!
#aweber #form #list #php or mysql #submission #update
  • Profile picture of the author Stephen Carter
    well, updating the MySQL database is straightforward, right?

    so instead of forwarding to Aweber you send the collected data to your script and update the database. then the only thing left to achieve is the Aweber submission.

    for this, all you need to do is add to your output page a 1x1 pixel frame with no border that will receive the submitted Aweber form, remove the submission element from the form, and then trigger the submission by adding some javascript to the <body> element like so:

    <body onload="document.forms.autosubmit.submit();">

    this triggers the form submission after the page is loaded. your Aweber form would be named autosubmit (in this instance) and you would put into it a target attribute that points to the frame:

    <iframe name="autoframe" frameborder="0" width="1" height="1"></iframe>
    <form method="post" action="http://www.aweber.com/scripts/addlead.pl"
    name="autosubmit" target="autoframe"
    >
    ...
    </form>

    the form contents are just the regular Aweber form elements with the name and email address added, and every form element is expressed as a "hidden" field so that it does not appear on the page.

    that's it. i'll leave you to experiment with it, but that's how i do it. works well.
    {{ DiscussionBoard.errors[4038025].message }}
    • Profile picture of the author ryanstreet
      Aweber passes form data via GET to the thank you page of your choice. You can always do it that way.

      1. Enable it to pass data:
      How Do I Pass Form Data to My Thank You Pages? :: AWeber Knowledge Base

      2. Write the MySQL scripting into the thank you page.

      3. Display final thank you or redirect to thank you page.

      4. ...

      5. Profits. Easy!
      Signature
      Ryan Street
      PHP Developer Specializing in WordPress and Magento
      {{ DiscussionBoard.errors[4038235].message }}
      • Profile picture of the author tunajim70
        Very Easy as long as Aweber Doesn't Go down as it has this week several times.

        I'm changing ALL of my funnels to backside Submission using Iframes, and javascript, and not keeping Aweber in the process loop.
        {{ DiscussionBoard.errors[8987692].message }}

Trending Topics