#1
  1. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0

    Post Charity Website - Passing input data from Site A form to Site B form. Is it possible?


    Hi,

    I am wondering if it's possible to have a user visit my website (Site A) and fill out a form that has first name, last name, email and a submit button. When the user hits submit, that information is emailed to me, but then the user is directed to Site B (Charity Water) where there is a form that is asking for some of the same information (First name, Last name, Email) along with the donation amount a payment details.

    I am wondering if any of that information that was gathered on my site (Site A) can be passed onto Site B page and prepopulate those fields so that information does not have to be entered twice?

    Thank you for your help!!!
  2. #2
  3. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    The external site is
    PHP Code:
    https:// my.charitywater.org /p/donate?campaign_id=34971#donation-info 
  4. #3
  5. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,231
    Rep Power
    9400
    In general no. You can accept the information, email it, and redirect the user, but you can't fill out forms on another site without them specifically giving you a way to do that.

    But you have lucked out. It seems like you can provide the first and last names and it will use them when it displays the page. The fields are named "first_name" and "last_name" so redirect the user to
    Code:
    https://my.charitywater.org/p/donate?campaign_id=34971&first_name=(firstname)&last_name=(lastname)#donation-info
    Try that yourself with your own name.

    PHP Code:
    $firstname "First name";
    $lastname "Last name";
    $url "https://my.charitywater.org/p/donate?campaign_id=34971&first_name=" rawurlencode($firstname) . "&last_name=" rawurlencode($lastname) . "#donation-info";
    // then redirect to $url 
  6. #4
  7. No Profile Picture
    Registered User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Apr 2013
    Posts
    3
    Rep Power
    0
    requenix, you are a legend! Seriously, you have no idea how much you have just helped me and my charity. Can I ask how exactly you found the form field names? I am curious about populating the comments section and donation amount as well.
  8. #5
  9. Transforming Moderator
    Devshed Supreme Being (6500+ posts)

    Join Date
    Mar 2007
    Location
    Washington, USA
    Posts
    14,231
    Rep Power
    9400
    I'm a web developer so I know how to read websites and see how they work. The Web Developer Toolbar extension for assorted browsers also helps - check the screenshot.
    Attached Images

IMN logo majestic logo threadwatch logo seochat tools logo