Jump to content

Help with login system/Personal Page


Xdega

Recommended Posts

I have a project and what I am trying to achieve here is a login system that can operate similar to Myspace (but way less advanced). I am quite a novice when it comes to PHP/SQL but I want to have a game plan before I really get working on this project.

 

Basically my idea at the moment is to try and create a simple login system (that part should not be too difficult). By this a user can login and edit database entries associated with their username.

I am pretty confident I can get this first part figured out. My problem comes with the second part:

 

To create a page for a user that registers an account such as "www.websiteurl/[uSERNAME]"

My initial idea is to try and pull a variable from [uSERNAME] and use it in the page script to pull data from the database based on that variable. I understand SQL Injection security risks involved and that the variable would have to be clarified as having nothing but a simple text string. But the main thing, Is this possible? if so How?

OR

If this is not possible, How could I go about creating this "profile page" for a registered user? Bearing in mind this does not to be super advanced (in fact the simpler the better). Simply the ability for a user to post text information to several fields,"update" their profile, and then access the data in read only form via their own personal url.

 

I don't want to have to manually create pages/folders. That kinda defeats the purpose, heh.

 

Thanks for your help in advance.

Link to comment
https://forums.phpfreaks.com/topic/214803-help-with-login-systempersonal-page/
Share on other sites

The /username part is simple, you can do that with a mod_rewrite rule in your htaccess - there are loads of examples online. The rewrite rule will pass whatever the username is as a variable into your chosen script. You can then clean the username and check the db to see if there is a username that matches, if it matches then load the profile details.

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.