dsgni26260 2013-06-16 05:40
浏览 69

使用两种不同的帐户类型登录注册

I am making a website login and registration page and it is working perfectly. Now I am in the part were I need to have two account types. Like Homeowner Account and Rentors Account.

Now what I have so far is I register and pick Homeowner Account It will go to a profile page with links and Images and that is relevant to that Account.

Register/Login-->Homeowner Account--->Homeowner Profile Page

But now When I register as a Rentors Account it goes to the same page with all the Homeowner Links. So How can I have it where I can read login and have the database read and determine which account type it has and then redirect it to the proper profile page (i.e. rentor profile).

Register/Login-->Rentor Account--->Rentors Profile Page

Also the reason why I want to have it direct to a different profile page is bc the visual looks of both Homeowner and Rentors Page is different with differnt colours and images.

I am working in php and mysql and have a database call users that has all the users info including the account type.

Thanks

  • 写回答

2条回答 默认 最新

  • dqs66973 2013-06-16 05:47
    关注

    Add one more field in that table and assign two role like homeowner and rentors. Then at the registration time insert this field with some value (homeowner and rentors) or (1 and 2). Then check at the time of login then redirect to corresponding profile.

    评论

报告相同问题?

悬赏问题

  • ¥15 如何在scanpy上做差异基因和通路富集?
  • ¥20 关于#硬件工程#的问题,请各位专家解答!
  • ¥15 关于#matlab#的问题:期望的系统闭环传递函数为G(s)=wn^2/s^2+2¢wn+wn^2阻尼系数¢=0.707,使系统具有较小的超调量
  • ¥15 FLUENT如何实现在堆积颗粒的上表面加载高斯热源
  • ¥30 截图中的mathematics程序转换成matlab
  • ¥15 动力学代码报错,维度不匹配
  • ¥15 Power query添加列问题
  • ¥50 Kubernetes&Fission&Eleasticsearch
  • ¥15 報錯:Person is not mapped,如何解決?
  • ¥15 c++头文件不能识别CDialog