我如何编码参考系统 [英] How do I code a reference system

查看:112
本文介绍了我如何编码参考系统的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

美好的一天,希望一切顺利吗?



我正在建立一个网站,我需要一个系统,用户可以引用其他用户到网站注册使用独特的链接。当用户引用10个成功的注册用户时,他们有权获得奖励。



请问最好的方法是什么,我没有试过任何事情因为我很困惑,我搜索了互联网,但错过了我在寻找的东西。请帮忙...





谢谢

Good day, Hope all is well?

I am building a website and I need a system where users can reference other users to the site to register using a unique link. When a user reference 10 successful registered user, they are entitled to an award.

Please what is the best way to achieve this, I have not tried my hands on anything cause am confused about it and I have searched the internet but miss what am looking for. Please help...


Thanks

推荐答案

假设有2桌。一个供用户和其他参考。用户表有一个名为user_id的唯一主键。现在,用户在此站点中注册,系统会为该用户分配唯一的用户ID。假设它 1 且用户名是 demo 。现在你需要创建一个名为referrer.php的页面,并将id和username设置为编码,例如 U8061IU9KDLP004RS (您可以根据需要使用任何类型的编码)。



Suppose there are 2 tables. One for users and other for reference. User table has a unique primary key called user_id. Now a user registers in this site and the system assigns a unique user id to that user. Suppose it is 1 and username is demo. Now you need to create a page called referrer.php and put the id and username as encoded e.g. U8061IU9KDLP004RS (You can use any types of encoding as you like).


encoded_referral_ID = base64_encode(
encoded_referral_ID = base64_encode(


id。


这篇关于我如何编码参考系统的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆