PHP to realize the development thinking of member login bonus points

Source: Internet
Author: User
Lunch break when you receive the PHP Chinese network 5 Netizens of a question, the original question is like this "I want to achieve a function: Users in my website registered an account, every day log on to my site, there will be an increase in points, this should be how to achieve it?" How does the idea go? ”。

I reply to the following information:

It's every landing plus points.

or increase the points by the day

If it is logged in. You just add an extra-integral SQL to the login handler.

If you are adding points by day. Like a week in a row, a special reward.

You need to add a list of points. Log the login time of all members and then calculate by time

After finishing the idea is as follows:

  1. Create a log table

  2. When the login verification-check the Member login log table, if there is an increase in points, if there is an increase in points, then only one additional log points field is empty, if not added to add a log with the integration record

<?php//query Log table, query conditions for the date of the day of the time stamp//judgment and processing whether the day has been logged on and not logged in the process (such as not landing add points)//Query the Log Table query conditions for continuous landing//If it is a continuous landing to increase points reward?>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.