You are here: String in php and js script « PHP Programming Language « IT news, forums, messages
String in php and js script

Posted by php_mysql_beginer911 on 12/09/07 02:51

Hi everyone ..
i am trying to use a string which was saved by php form and contain
single quote ' or double quote

" .. when i using that string in my js script function like
function

onclick='js_test("<?=$string;?>")'

if $string contains double quote it will simply break the function ..
and same goes for single quote if i

surround $string with single quote i tried using escape and unescape
but that means .. every place i am using php ddata which might contain
single or double quote i have to use those javascript

function . as i am very new to programming if somebody could advise
what is the best way to deal

with string when we use js script and php

hope you can understand my english and hope somebody will reply soon

thanks

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация