Jump to content

Profile Page


Cetanu

Recommended Posts

If I wanted members on a site to have a profile page, it would just be a page that pulls their info from my database, right?

 

How would I go about doing this (what kind of script would I need?) ?

Link to comment
Share on other sites

Can be done with mysql / php.

 

1. When a user clicks on their profile pass a parameter in the url to identify the users database record i.e the primary key: profile.php?id=123

2. Validate the parameter to make sure it is the correct data type and format (not manipulated)

3. Connect to the database and select the record using the url parameter

SELECT * FROM user WHERE id='123'

4. Print the data to the screen

 

Simple!

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.