Can anyone help me please.
im trying to show my site to people that are not banned from my website the html part at the top should only show when they are not banned and if they are banned then it show display the php you are banned code. When they are banned it still shows the html coade part aswell.
PHP Code:<B>Website Coming Soon</b>
<?php
include("config.php");
mysql_connect("$host", "$username", "$password");
mysql_select_db($db) or die(mysql_error());
$sql = "SELECT * FROM ip";
$result = mysql_query($sql);
$row = mysql_fetch_array($result) or die(mysql_error());
if ($_SERVER["REMOTE_ADDR"] == $row["ip"] )
{
echo "You are banned from viewing this website";
}
?>




Reply With Quote