Jump to content

Implode Removing \\ From Mysql_Real_Escape_String


richiejones24

Recommended Posts

MySql Values after implode() '140 Church Street','St John\'s Wood','London','NW8 8EX'

MySql Values before implode() '140 Church Street','St John\\'s Wood','London','NW8 8EX'

 

The Code


while ($f < count($AddressSplitBus))
{
$AddressSplitBus[$f] = trim($AddressSplitBus[$f]);
$AddressSplitBus[$f] = mysql_real_escape_string($AddressSplitBus[$f]);

$f++;
}

//Create the Values to insert into DB
$MysqlValuesBus = implode("','", $AddressSplitBus);
$MysqlValuesBus = "'$MysqlValuesBus'";
$NumberValsBus = count($AddressSplitBus);

 

Again Thanks for the help guys

Your values before the implode should look like the values that you get after. It looks as though you are escaping data that has already been escaped. Have you checked that magic_quotes are not on?

Right, this code proves nothing other than you still say something which most of us think is impossible.

 

Barand is right, this data is already escaped by something. Though that has no bearing on implode()

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.