Profile Page- Code Explanation


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:

Area of Expertise:

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:

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


This entry was posted in Code. Bookmark the permalink.

Leave a Reply

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

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

Google+ photo

You are commenting using your Google+ 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 )


Connecting to %s