0

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

http://www.theflickzone.com/showthread.php?p=24961#post24961 http://www.theflickzone.com/tags.php?tag=Google+Video http://www.theflickzone.com/showthread.php?p=25067#post25067 http://www.theflickzone.com/member.php?find=lastposter&f=34 http://www.theflickzone.com/member.php?find=lastposter&f=31

Well there are just some. There are many more.

Thanks :)

2
Contributors
5
Replies
6
Views
8 Years
Discussion Span
Last Post by !Unreal
0

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

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

There isn't one :(

EDIT: Just for a bit of context...

<?php
include('includes/config.php');
$referer = $_SERVER['HTTP_REFERER'];
$addtolist = $_GET['add'];
mysql_query("DELETE FROM spider WHERE url='$addtolist'")or die(mysql_error());
header("Location: $referer");
mysql_close($con);
?>
0

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

0

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 topic has been dead for over six months. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.