naw those echos are working correctly since it checks for affected rows ==1 not ==0. yeah i hear what you're saying but i figure it should be accurate since maybe in the future this will be useful. for instance if someone is having trouble accessing the site we can check the ban list and know for sure there is not an entry. i'm just picky like that i guess.
alright i used real escape. i just shoved it in right before the call to the db:
PHP Code:
$time = date("y/m/d : H:i:s", time());
$ban_this = $_POST["ip"];
$why = $_POST["why"];
$ban_this = mysql_real_escape_string($ban_this);
$sql="INSERT INTO banned (IP, TIME, REASON)
VALUES('$ban_this', '$time', '$why')";
i'm not sure how to test if it's working though since i've never hacked a db lol. hopefully that's right. thanks for all your help dan
Bookmarks