Im trying to delete records. Most delete ok but some don't and Im completly lost as to why...

The information Im storing are just URLs.

Could it be to do with some irregular characters within these URLs?

Is there a recomended way to store a URL?

Please help me out. Its quite a major flaw in my script

I think it probably is the irregular characters.

Here are the records which wont delete

Well there are just some. There are many more.

Thanks :)

What error is returned?
Add or die(mysql_error()); to the closing bracket of the query as so:

mysql_query("....")or die(mysql_error());

There isn't one :(

EDIT: Just for a bit of context...

$referer = $_SERVER['HTTP_REFERER'];
$addtolist = $_GET['add'];
mysql_query("DELETE FROM spider WHERE url='$addtolist'")or die(mysql_error());
header("Location: $referer");

Yeah. Im expecting to get these characters. I just need to know how to handle them.

I managed to work this one out.

You have to work with the URLs in an encoded form. Using rawurlencode and rawurldecode.

Thanks for your help though :)

This article has been dead for over six months. Start a new discussion instead.