I am trying to capture the website's name that links to my website. When a person clicks that link, it should add it to my database. For some reason though, it isn't working. Any suggestions?
Also it is very inefficient to store IP addresses as 20 bytes varchar since it can be stored as 4 bytes int and easily converted between int and string with ip2long() and long2ip() functions respectively.
Tried adding the code to check for any errors, and it returns nothing. I've been told that http_referer doesn't store the value very well. not sure what to do to get it to work.
So the problem is that your query fails while being executed or is not executed at all due to condition that is never true? Or how exactly does it "not work"?