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
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.

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.