ffxpwns Posted May 16, 2012 Share Posted May 16, 2012 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. Quote Link to comment Share on other sites More sharing options...
ffxpwns Posted May 16, 2012 Author Share Posted May 16, 2012 Anyone? Quote Link to comment Share on other sites More sharing options...
Jessica Posted May 16, 2012 Share Posted May 16, 2012 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? Quote Link to comment Share on other sites More sharing options...
ffxpwns Posted May 16, 2012 Author Share Posted May 16, 2012 I'm really damn bad at the MySQL stuff. I'll look into it, but at the time, I have no idea how to do the find someone and add 10 to balance and all that. Quote Link to comment Share on other sites More sharing options...
scootstah Posted May 17, 2012 Share Posted May 17, 2012 You use an UPDATE query with a WHERE clause. http://dev.mysql.com/doc/refman/5.5/en/update.html Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.