S
Spyker73
Guest
I am trying to make a simple IP ban for a website, and I am using MySQL to store the banned IP's to make it simple.
The problem is, I don't know how I would include MySQL in this
The part I have problem with is this line
$ban_ip = '127.0.0.1';
That is the banned IP, but it only shows 1 IP, I could use array but I want this to be alot easier by using MySQL, so how would I throw a query in there to select all the IP's in the table "webban"?
My webban table has 3 columns, ID, IP and Reason
I tried making it like
$ban_ip = 'mysql_query("SELECT * FROM webban WHERE ip")';
But that doesn't seem to work.
Thanks in advance
The problem is, I don't know how I would include MySQL in this
The part I have problem with is this line
$ban_ip = '127.0.0.1';
That is the banned IP, but it only shows 1 IP, I could use array but I want this to be alot easier by using MySQL, so how would I throw a query in there to select all the IP's in the table "webban"?
My webban table has 3 columns, ID, IP and Reason
I tried making it like
$ban_ip = 'mysql_query("SELECT * FROM webban WHERE ip")';
But that doesn't seem to work.
Thanks in advance