Jump to content

How would I go about writing a referral script?


ffxpwns

Recommended Posts

In the database, I have a table called 'users' inside that I have email, nick (aka username), and balance.  The individual aspects are set up, and work.  My site is also successfully connecting to and reading / writing info in the database.  So my question is:  How would I go about having a box on the register page called 'refer' where the person would enter their referrers email (or nickname, one or the other) then it finds that person, and puts a value of 10 in 'balance'.  Anyone with more experience than me have any ideas?  All help is greatly appreciated.

Link to comment
Share on other sites

Do you know how to create a form in HTML? Do you know how to do a SELECT using a WHERE clause and an UPDATE also? That's the knowledge you need to do this, and you already have the business logic so where are you stuck?

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.