L Posted June 3, 2007 Share Posted June 3, 2007 I'm new to PHP and I usually learn by doing examples, so here is one I'm working on l.orgfree.com/index.php In this simple version i can register, logout, login. but I want to know how I can make it so users can view their information, and change it, and add new registration fields in the register page(e-mail, a confirm password box, a I agree to terms checkbox (where if not checked it brings you back)). Also I was wondering how I can give different users a status, like a admin, guest, user, or super user. I'm new to php and I was hoping you guys could point me in the right direction. I'm using mysql for the database, MySQL client version: 5.0.27) -Thank you for your time ~L Quote Link to comment https://forums.phpfreaks.com/topic/54048-solved-login-help/ Share on other sites More sharing options...
pocobueno1388 Posted June 3, 2007 Share Posted June 3, 2007 Well, to do everything you want to do you will need a database. I assume you have a users table? Well, in that table just add a row called "rank" and put what rank they are. Then when you program you would obviously have to add who can do what depending on what their rank in the DB is. To have a page where all their information is on, you would just store all their information in the database. When they update it you will just have to program a simple mysql query. Example: mysql_query("UPDATE `users` SET `password`='$password', `username`='$username' WHERE ID='$id'"); When they log in you can register them a unique session [their ID in the DB] so you can pull information from the database on them by using that session. I know you may not understand everything I just put...but it's a start. I would just recommend getting the basics down before jumping into projects. Quote Link to comment https://forums.phpfreaks.com/topic/54048-solved-login-help/#findComment-267209 Share on other sites More sharing options...
L Posted June 3, 2007 Author Share Posted June 3, 2007 Yah, you're right....I guess I have to do some more work before attempting anything big. Thanx for the advice though...I think I can do the rank thing right now and I'll give it a try... -Thanx for replying though ~L EDIT: Yah, never mind that.....I'm pretty much lost, but I''ll just go back to the tut. Quote Link to comment https://forums.phpfreaks.com/topic/54048-solved-login-help/#findComment-267210 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.