Hi all, i need some help.

I am creating mysql php game. How can make game to know which user is logged .

I am not absolute noob. I already created register, login and main page, and its all linked with database. Problem is when user need to use his profile, for example. Only way to open his profile is via href. And then my program cant pass his id to profile.php.

Can cookies help me? What they are, and how to use them?

I hope you got my question.

Thx ahead

On login store the userid in a Session, then it is available to php
I know sessions exist, DONT know how to implement them so here is a link, which does include session cookies
http://www.php.net/manual/en/features.sessions.php

Thank you very much man for quick and correct answer. I will finish sessions for my game tonight.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.