# Banning a user with cookies

**URL:** <https://forum.kirupa.com/t/banning-a-user-with-cookies/247636>\
**Category:** programming\
**Created:** [December 27, 2007, 4:20pm UTC](https://forum.kirupa.com/t/banning-a-user-with-cookies/247636 "2007-12-27T16:20:52Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![webreforms](https://avatars.discourse-cdn.com/v4/letter/w/91b2a8/32.png) [@webreforms](https://forum.kirupa.com/u/webreforms)\
**Post date:** [December 27, 2007, 4:20pm UTC](https://forum.kirupa.com/t/banning-a-user-with-cookies/247636/1 "2007-12-27T16:20:52Z")

</div>

Hi!

I need some help.

Can anyone tell me how I would go about coding a PHP system in which I can give a user a cookie (if they register, etc.), and the system checks if that cookie exists. If it does, the system displays a ban message. I would also like to know if it is possible to check for the cookie, and if it exists, also ban by IP. Or, if a user has a certain banned IP give them a ban cookie too.

I hope I didn’t make it too confusing to understand, but if anyone can help me I would appreciate it.
