1
Hello
I'm trying to ban a user from a certin page not from the whole site this wht i have done to do so .
1- Created MySQL table that will include the user id .
CREATE TABLE `userid` (
`us_id` INT( 11 ) NOT NULL AUTO_INCREMENT ,
`user` VARCHAR( 255 ) NOT NULL ,
PRIMARY KEY ( `us_id` )
);
2- Make the file that will insert the user id
if (isset($_POST['submit'])){
//userid variable from form
$userid = $_POST['userid'];
//inset userid
mysql_query("INSERT INTO userid (user) VALUES('$userid') ")
or die(mysql_error());
echo "$userid Added";
}
?>
Add userid
3- I need someone to Show me now How to add code in the Top of the Forbbiden page that i need to keep the user away from Viewing it ..
Code to check if the user id matchs the id inserted in the table to print message for him says he was banned from this page .