Click to See Complete Forum and Search --> : how to display user relevant data from mysql


youngGHopperrrr
07-02-2008, 10:20 PM
I have designed a user login page in php and am having trouble figuring out how to display something as simple as "Hello [username]!" after logging in.

thanks for the help in advance!

youngGHopperrrr
07-03-2008, 02:36 AM
well I have figured out how to do what I mentioned above by using a session variable, but what would be the most efficient way to display any or all of the data stored in the db corresponding the logged in user?

eCat
07-03-2008, 04:42 PM
Well, I'm no PHP expert, but since you already have the user ID, you could just iterate through that user's row data and spit it out with an echo statement.

eCat

eCat
07-03-2008, 04:44 PM
Oh, and you might get more replies if this post got moved to the PHP or SQL forums. =)

youngGHopperrrr
07-03-2008, 05:44 PM
Yes I am no PHP expert by any means and what you say is pretty much what I had in mind. Now that I think about it, that little bit of code or syntax is what will do the trick, which makes this "Dreamweaver" post my fault. I guess I was just hoping to push a few buttons in cs3 to do it, but I think I can push through the laziness.