Reply to Re: Storing a javascript variable in a php string

Your name:

Reply:


Posted by Markus Schuster on 07/07/06 08:06

Kimmo Laine schrieb:
> "Markus Schuster" <schumax@sbox.tugraz.at> wrote in message
> news:44ae09cd$0$12384$3b214f66@aconews.univie.ac.at...
>> Hi,
>>
>> I have the following javascript function:
>>
>> <script type="text/javascript">
>>
>> function HTMLEncode( text )
>> {
>> text = text.replace(/&/g, "&amp;") ;
>> text = text.replace(/"/g, "&quot;") ;
>> text = text.replace(/</g, "&lt;") ;
>> text = text.replace(/>/g, "&gt;") ;
>> text = text.replace(/'/g, "&#39;") ;
>>
>> return text ;
>> }
>>
>> </script>
>>
>> Now I want to store the content of 'text' in a php string.
>> Is that possible?
>
>
> Yes, insert the text in an input element that is inside a form and submit
> the form to the recieving php page.

You mean it like that?

<form action="bla.php" method="post">
<input type="hidden" name="text" value=text>
<input type="submit" name="show" value="show">
</form>


Is that part ok?

value=text

Or how can I do it correctly?

Thanks, Max


> By the way, a similar conversion function is available also in php, called
> htmlentities.
>

[Back to original 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

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