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

Passing Arguments to execlp()
I'm writing a program that mimics a unix shell. It's supposed to take commands with arguments and ex

UL and LI Add Form
The idea I want here is when the user click on a character name from the drop down select bar at the

moving mouse to display image coordinates
I have an existing MFC application that shows an image in the main window.
I'd like to be able to

quick question about System Change Number(SCN) in FlashBack Query topic
i know tht we can get the SCN of the database using flashback concept as follows

SQL>

Reduce redundancies in switch functions?
Hello all! I somewhat new to PHP, and was wondering if anyone could give some suggestions on a swit

Java API in PHP?
I have an application that we use internally here at the office.

The software company provide

Is there a quick way to do this?
Hi all,

I need to create a mysql table from php that goes a little something like this

unserialize help, getting errors
hi all ,
I got a form with 6 fields (2 input and 4 select box), when the page loads one block is

pspell
using pspell, is it possible to get words that would be best in the current phrase?

For examp

unexpected T_VARIABLE error
Hey all! I'm getting an unexpected T_VARIABLE with the following function:

function getHighes

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