【发布时间】:2014-12-12 07:35:59
【问题描述】:
我正在尝试使用本教程实现类似 Twitter 的关注系统:http://www.9lessons.info/2009/04/exactly-twitter-like-follow-and-remove.html
对于我的数据库,我需要两个变量: current_user:当前登录用户的用户名 profile_user:已访问其个人资料的用户的用户名
现在,每个配置文件都有一个这样的网址: profile.php?user_username=aaa¤t_user=bbb
这里,user_username:访问过其个人资料的用户的用户名,即profile_user current_user:当前登录用户的用户名
我想要实现的是,当 current_user 点击一个按钮时,默认情况下是“关注”,在数据库中会有一个条目,其结构是这样的: follow_current_user:存放当前用户的用户名 follow_profile_user:存放profile_user的用户名
对于正文结构,我已彻底按照教程 (http://www.9lessons.info/2009/04/exactly-twitter-like-follow-and-remove.html) 进行操作,但无法正确实施。有什么帮助吗?
更多信息: 用户数据库如下: 用户身份 user_username 用户密码
【问题讨论】: