Location: PHPKode > projects > Simple Comments > comments/admin/banip.php
<? require("header.php"); ?>
<?
require_once( '../config.php' );
$ip=$_GET['ip'];
?>
<form method="post">
<p align="center">
Are you sure you want to ban this ip?
<input type="hidden" name="confirm" value="1">
<br>
<input type="Submit" value="Ban">
</form>
<?
$confirm=$_POST['confirm'];

if ($confirm==1) {

mysql_connect($dbaddress,$dbuser,$dbpass);
@mysql_select_db($dbname) or die( "Unable to select database");
$query = "INSERT INTO banip VALUES ('0','$ip')";
mysql_query($query);
echo "<br>IP Banned.<br>";
mysql_close();
?>
<br><br>
<a href="javascript: history.go(-2)">Back</a><br>
<?
} else {

?>
<br><br>
<a href="javascript: history.go(-1)">Back</a><br>
<?
}
Return current item: Simple Comments