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

Links not updating
I'm trying to fuel a simple navigation system for a news section. It works fine when it comes to ret

Warning message
I've put a website that I was doing live and I'm getting this warning message when I try to add a ne

Setting a default timezone?
I have read about how to change the timezone in PHPMYADMIN, but it changes back, it doesn't STAY the

Allowing ' and "
Hello everyone,

I am creating a form where users submit information to go into a database. I

Significance of BPM
Hi Experts,
I am a novice in BPM , I just want to know how BPM as permenant department is

Bluetooth RSSI & VIsta
Okie I got 4 Bluetooth adapters, a DBT-120 by Dlink, A Zonet Microsoft Bluetooth which is what I use

present value of sequence?
Hi

Please help me to find out the present value of sequence?

Thanks

Only add new information from XML to MySQL
What I am doing, is taking a xml file, and adding the values to a database. However, what I want to

Not showing whole name with mail () script
I sent up a simple mail form with the PHP mail() script. One problem is when it sends an email with

Preg_match unknown modifyer
Hello,

Im trying to write a little script for my forums i need to get the reply from my forum

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