I have some free time and I want to build a social network site as a learning experience. I already know HTML, CSS, Javascript and basic Mysql and Php. I've already built a basic login authentication system in CakePHP. What I don't understand (and can't seem to find on google or stackoverflow) is how to build a login system that takes the user to a unique page that only they can access. Thanks in advance.
1条回答 默认 最新
- duanjing9739 2012-06-01 21:03关注
This will be a great learning experience but...
I think many will agree that your question is very broad and that is why you're having a problem finding it on StackOverflow which is for specific questions. By taking one small step at a time by trying read more basics and post here about specific questions will make your ride much smoother, you don't want to dive headfirst and risk going crazy. With that said... Let me get you started :)
You say:
how to build a login system that takes the user to a unique page that only they can access
I think you should try to think of it as all users are accessing the same page, but with unique data is being pulled from your database. Now, what's going to tell your program which unique data to pull is going to be a something called a session. So lets say you login to Facebook, a session is then started and tells facebook who is logged in and which data to pull from the database, thus which messages you can access, your name, etc.
Here are simple tutorials on Sessions and Cookies. Good Luck :)
本回答被题主选为最佳回答 , 对您是否有帮助呢?解决 无用评论 打赏 举报