Slashes


Posted on 16th Feb 2014 07:03 pm by admin

Have a small problem and I'm not able to understand why I'm getting the results I'm getting... and it's all down to darn slashes.

The brand in question is O'Brien

Code: [Select]<div><a href="javascript:void(0)"onclick="window.open('/admin/popup/shop.php?tbl=brands&brand=<? echo addslashes($row["brand"]); ?>&brandId=<? echo $row["brandId"]; ?>&action=edit&step=1', 'none', 'width=750,height=250,menubar=no,status=no,resizable=no,location=no,toolbar=no,scrollbars=yes,left=50,top=50,titlebar=no')">EDIT</a></div>

The addslashes is giving me the result O\'Brien - 3 slashes, not 2!

Therefore when we are preparing to use a form to input it back into the database:

Code: [Select]<input name="brand" type="text" value="<? echo mysql_real_escape_string(urldecode(stripslashes($_GET["brand"]))); ?>" />

It's being entered as O'Brien - still with a slash, instead of O'Brien...

Any ideas?

No comments posted yet

Your Answer:

Login to answer
319 Like 24 Dislike
Previous forums Next forums
Other forums

What are causes of a connection-timeout with fopen()?
Hello! Here is the situation: The server I host my website on just upgraded it's PHP build from 4.4.

How can I Compare two xml documents?
Hi all,

I am doing a POC for my project and I am using XE database 10g version.

cstdatomic (c++0x std::atomic) / g++ 4.4
Hello,

I'm trying to use cstdatomic (std::atomic in the upcoming c++0x standard) in g++

Code working in IE but not FireFox
I created a dynamic navigation list for my website based off of a table in my database. The code is

Conditions of info record - Error
When i created GR (901) and PO create automatic my PBXX is obtain the net price of info record but

i need help with php header and footer
I have designed a header and footer for my site and they seem to be ok when they are running individ

this code is not working????
it says this error.. Warning: Division by zero in ..

the variables are correct, so why is th

using a loop help
Hi guys , i need some help. I have this loop :
while ($row = mysql_fetch_assoc($Result)) { ?&

Form submissing with PHP and JQuery/Ajax
I have searched everywhere, but cannot find a solution for this... I have worked all day trying to g

Format timestamp from mysql
When I tried this:
Code: date("m/d/Y H:i A", $row['timestamp'])
I got 12/31/1969 18:

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash