Hello everyone again,

When a user logs in a cookie is set on the users computer called genieuk_logged_session

The value in the cookie is a random id created using a random key that the script creates, if i can i need to compare the value of randomin id in the cookie against the value that was put in the db at the same time.

Can anyone tell me please if i can compare a cookies value ? and if i can how would i do so?

Thanks,
Mat

I would think you would just query the database to return the random value that was stored for that user and then do something like:

if($_COOKIE['genieuk_logged_session'] == $some_value)
{
echo 'Values match'; 
}
else 
{
 echo 'Values DO NOT match';
 }

Just taking at a stab at that one but it seems like it would do the trick.

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.