Profile Page- Code Explanation

screen-shot-2014-12-30-at-09-36-54

The profile page now shows the relevant information that corresponds with the user that is currently logged in, such as ‘Name’, ‘Country’, and ‘Area of Expertise’.

I have done this by echoing out the following variables like so:

Name:  
Country:
Area of Expertise:
Portfolio:

The above variables are linked to the variables used in the register form.

However, another section of code is also needed to ensure the correct users information is displayed. Therefore I have had to use the following link:

This code uses the variable $myprofile to look up the USER ID which is declared below:

$myprofile = $row[‘USERID’];

The above code is what generates a URL specific to the user:

http://cs12cm.icsnewmedia.net/PROJECT/profile.php?user=78

If I were to check user 78  in my database I will see the user ‘yes’ in there, as shown below:

screen-shot-2014-12-30-at-09-48-22

Advertisements
This entry was posted in Code. Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s