I have this string.... I'm trying to put into mysql.
$Meta7x = "onClick=\"openBrWindow('".Meta7url.$Meta7."','scripts','')\"";
I need to ignore the quotes after onClick= and ignore the quote after the last )
What am I doing wrong?
Thanks
use $Meta7x = addslashes($Meta7x); before inserting, then stripslashes() when you pull it back out of the DB.
Cheers,
Mal
Yeah that's a good one...
However it has to be correct going into MySql because I'm pulling from MySql without using PHP and I don't have the option to strip slashes.
Do you have access to the php.ini file? If so try ensuring the "magic quotes" are turned on, that should help...
Cheers
nope....
There's got to be away to just ingnore the double quotes in a string like this...
It has to be in the Database with the double quotes....
How about this:
$Meta7x = "onClick=chr(34)openBrWindow('".Meta7url.$Meta7."','scripts','')chr(34)";
Or maybe:
$quote='"'; $Meta7x = "onClick=".$quote."openBrWindow('".Meta7url.$Meta7."','scripts','')".$quote;
Nope but good try...
Anyone know why the \" won't work...
How do I get the "'s included in the string.
One more suggestion before violence breaks out:
$Meta7x = 'onClick="openBrWindow(\'".Meta7url.$Meta7."\',\'scripts\','')"';
Also, are the trailing quotes supposed to be there? The onclick operator's internal quote has already been closed.
Yeah the trailling slashes have to be there... I took care of those as well...
so Nope this didn't work...
I think I'll crawl back in my hole and play dead now...
For those interested... Here's the solution... Use double spaces instead of double quotes for those onClick, onChange etc...
$Meta7x = "onClick= openBrWindow('".$Meta7url.$Meta7."','scripts','') ";