Jump to content

SELECT problem


derrtyones

Recommended Posts

I got a tablename called portfolio. It contains some general information of users like id, loginname, password, firstname, lastname, age, location. I need a PHP script that reads and displays the information of the user that's logged in. So I think the easiest way out would be something like selecting everything where the loginname is the same as the sessionname. How do I do this?

Link to comment
Share on other sites

Yeah just think about it. Write down some logical steps that you should take.

 

First you would need the person to login and set the session of their name (which it sounds like you've done).

 

Second you need to query the database and retrieve this information using a function such as mysql_fetch_assoc().

 

Third you would just need to display the information to the user.

 

Really you just need to think about things logically. If you have trouble then write down the steps. If you need more help, Google is a very good friend to have.

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.