Jump to content

Login Question


jaybeeb

Recommended Posts

Created a Login page using php/sql but am confused , when it comes to the user actually logging in how do I make each user have their own individual page. The page format will be the same with each user but each user will be able to upload and delete a file once they login and I obvisouly I only want the user that is logged in at the time to be able to upload / delete files on somebody elses account, can anyone point me in the right direction?

Link to comment
Share on other sites

You need to use something like sessions to store say, the users ID that is in the MySQL database.

 

Then, using $_GET make a page called profile.php that retrieves the id from the url. So when you go to www.site.com/profile.php?id=5 it'll grab the 5 from the URL.

 

Example:

$id = $_GET['id'];

 

With this ID, you can now query the database to extract only the information related to that ID. Then you can display the extracted data in however format you like.

 

Then the upload files part, I would search Google for tutorials on how to upload a file. But get the basic profile page working first. There are plenty of tutorials around about that as well.

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.