latest stable versions: v150827 (changelog)

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Passing URL arguments into the Registration P

Home Forums Community Forum Passing URL arguments into the Registration P

This topic contains 1 reply, has 2 voices. Last updated by  Raam Dev 4 years, 4 months ago.

Topic Author Topic
Posted: Monday Aug 13th, 2012 at 2:37 pm #21900

I am needing to add some functionality to the s2member registration process to link a newly created s2member ID to a “sponsor ID”. The sponsor ID will be passed as an argument from the Join button on our landing page.

Example: Keith is current member with ID 123. He e-mails John a link like: http://mysite.com/member/123

When John clicks that link he is sent to a landing page that has http://mysite.com/member/123 as it’s URL.

John then clicks the JOIN button on that landing page and is sent to the s2member signup page. The member ID: 123 from the url needs to be available within the s2member signup page so that when the user completes the sign up, pays, etc. and the new user is created, a table can be updated that links the sponsor ID: 123 to the newly created user ID, say ID 125.

The schema for that table is simple and would be filled in as follows:

Seq      Sponsor ID      Member ID
1          123                125

Where 123 came from the Join Button link that sent them to the signup page
and 125 is the newly created ID after the member successfully signs up and pays.

Any ideas?

Thanks,
Keith

  • This topic was modified 4 years, 4 months ago by  Keith Crow.
  • This topic was modified 4 years, 4 months ago by  Keith Crow.
  • This topic was modified 4 years, 4 months ago by  Keith Crow.

List Of Topic Replies

Viewing 1 replies (of 1 total)
Author Replies
Author Replies
Posted: Tuesday Aug 14th, 2012 at 9:15 am #21979
Raam Dev
Username: Raam
Staff Member

Hi Keith,

This would normally be handled using cookies. On your signup page, you’d have some PHP that checks for the presence of the “referral ID” and then creates a cookie using that referral ID (for example if your URL was /member/ref=123 you’d check and pull that in PHP with $_GET[‘ref’]).

Then you’d need to use one of the s2Member Registration hooks and write some PHP code that is executed upon completion of a registation. That code would look for the referral cookie and if found update the database linking the two IDs together.

Viewing 1 replies (of 1 total)

This topic is closed to new replies. Topics with no replies for 2 weeks are closed automatically.

Old Forums (READ-ONLY): The community now lives at WP Sharks™. If you have an s2Member® Pro question, please use our new Support System.

Contacting s2Member: Please use our Support Center for bug reports, pre-sale questions & technical assistance.