bdg1983
10-28-2001, 12:12 AM
Hi, I've got some disruptive users on my forum (homemade(Click Here (http://gaffle.net/forum2/))) that I would like to get rid of.
Background info:
When the user logs in, it sets a cookie for 30 days. The purpose is to completely ban this user from viewing the site.
Now, what I thought about doing, to rid the forum of this one person who's username is "tom"...
is by, next time, when someone submits a new topic, or a new response to a topic, it will check to see if his username is "tom", if it is, it will set another section in his cookie labled "not_coming_back 1".
Then, in an include file that goes into every single page, i would put something along the lines of:
<?php
if($not_coming_back = '1'){
header("Location:http://cnn.com");
}
?>
That works sometimes..but if you go straight to the forum, it states that it can't send the header because they've already been sent.
So basically, I need another way to keep this user from visiting the site.
any help is appreciated.
Alex
Background info:
When the user logs in, it sets a cookie for 30 days. The purpose is to completely ban this user from viewing the site.
Now, what I thought about doing, to rid the forum of this one person who's username is "tom"...
is by, next time, when someone submits a new topic, or a new response to a topic, it will check to see if his username is "tom", if it is, it will set another section in his cookie labled "not_coming_back 1".
Then, in an include file that goes into every single page, i would put something along the lines of:
<?php
if($not_coming_back = '1'){
header("Location:http://cnn.com");
}
?>
That works sometimes..but if you go straight to the forum, it states that it can't send the header because they've already been sent.
So basically, I need another way to keep this user from visiting the site.
any help is appreciated.
Alex