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

NOOB needs help with upload file
The intent of this form is to create a folder for a client and upload an image into another folder '

Consuming MII WebService in Java WebDynpro
Hello,

We are facing a strange situation...

We define a transaction in MII to

Help with parsing this html
Hi,
I've got some html i just need a couple of strings from.. argh, it's freaking me out. I've t

Number Format
Hi All,

I have number '000000000050085' I want to format it to 500.85 Can any one give me

Gantt Chart Tool
Does anyone know of a good free gantt chart creator tool

Thanks

How to file_get_contents when login required?
Hello!

I am trying to read data from a page that you have to be logged into to view, I am try

couldn't connect to your database
Hello I am new to php mysql

Actually i have read A tutorial on nettuts
"http://net.tu

Database connection failure
Hello All,

I am trying to create new connection to Oracle DB 10.1,
I could not see a

A WBS element with the name XXX already exists in version FREI_VERSION
Hi.
When I am trying to insert WBS element in a project, error occurs:

"A WBS eleme

Tree Menu
Hi guys,

Can anyone help me making a tree navigation system? I have a site where I'm allowin

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