Posts: 3,621
Name: Thierry
Location: I'm the uber Spaminator !
|
I give you the logic, and let you try to code it.
1) gather the ip from the user
2) connect to the db
3) do a SELECT query with the gathered ip to chek if it exists
4) if it doesn't exists, make an INSERT query
And if your db have a UNIQUE INDEX on the field storing the ip, you can even avoid the check, as the db will refuse to insert a second time this ip.
A bit dirty, but it works.
__________________
Only a biker knows why a dog sticks his head out the window.
|