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?

319 Like 24 Dislike
Previous php-forum Next php-forum
Other php-forum

show random images
hey guys

can someone please suggest a way in which the following code can be edited so it onl

I need help on this PHP code
Hi everybody, I made some kind of mistake while editing the code below. As you see, at the 3 row my

Why use interfaces in PHP (OOP)
I am learning OOP in PHP and its been a pretty good learning experience so far. What I didn't unders

How to display value in drop down list after form has been reloaded
Please bear with me as I am very new to php and html.

I have a form with several drop down me

Ignore html and bbcode?
I've created a function to limit the amount of text according to the amount of words.

However

MYSQL gen help
This is my Mysql gen. can anyone tell me why this echos

MID(networkset.networkid, 3, 3) AS &q

Multidimensional array problems in $_POST
I'm having trouble with a three-dimensional $_POST array. It starts as a two-dimensional array on th

=> and <=
So I was digging through some code when I came across the <= operator. This is the first tim

random generation
hi

i need help with generating this

numbers from 1-12

i want to generate in ran

 formating when pulling data from a mysql database 
Ok so Im not to sure if this is the right thread to post in but here is my catch 22 issue.

I

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