How do I show personal information on my user page?

Codes here !

Moderators: macek, egami, gesf

New php-forum User
New php-forum User
Posts: 1
Joined: Mon Jun 25, 2012 11:40 pm

How do I show personal information on my user page?

Postby Forocon » Mon Jun 25, 2012 11:43 pm


I'm in some trouble making a login page that shows some personal information. I'll give u a detailed example.

I've got an inlog.php page wich redirects to another page named userarea.php. This user area contains a guestbook, a foto album and some personal information.

When someone logs in with for example username = John, password = 123, the page should show different messages in the guestbook, different foto's in the foto album and different personal information displayed on the userarea.php page.

So my guesses are that I need at least 4 tables, correct me when I'm wrong;

A table users with user_id (primary, AI), username, password.
A table information with for example information id (primary, AI), name, text.
A table guestbook with guestbook_id (primary, AI), name, text, date, time, ipadress (to block when spam)
A table photoalbum with photoalbum_id (primary, AI), title, picture, message, date

Than I should probably link the information_id, the guestbook_id and the photoalbum_id to my user_id. But I have no idea how to do this and how to display this on the page.

So I know how to make the guestbook and the album, the only problem is showing different messages from the guestbook, different information and different pictures in the album when different users log in.

Could someone please tell me how I can do this?

Thanks for your time!



php-forum Super User
php-forum Super User
Posts: 1805
Joined: Thu Mar 10, 2011 5:07 pm

Re: How do I show personal information on my user page?

Postby johnj » Tue Jun 26, 2012 4:55 am

You have user_id as the primary key. Why don't you use that to pick different users?

Return to “mySQL & php coding”

Who is online

Users browsing this forum: Baidu [Spider] and 5 guests