Annaccond
05-09-2007, 09:25 PM
My problem:
Let's say I have FORM with TEXTAREA and user writing something there. Than click on the button and I want to some words in what he wrote be replaced and to whole text with replaced words be showed or posted in 2nd text field or some div or anywhere (for example it could be used to prevent cursing and automatically replace some "****" to "fu**" or something like this).
Now my question is:
1. can is possible make it with PHP only
- if yes than how to make output textarea value as php string variable?
2. if it's not possible than can I use JavaScript "document.form.textarea.value" as php string variable?
3. if both aren't possible than WHAT SHOULD I DO?
I suppose that I can make it if I save output from textarea in database and than I'll be able use it as string but I really need to make it without saving text from textarea.
Any help will be highly appreciated :(
Let's say I have FORM with TEXTAREA and user writing something there. Than click on the button and I want to some words in what he wrote be replaced and to whole text with replaced words be showed or posted in 2nd text field or some div or anywhere (for example it could be used to prevent cursing and automatically replace some "****" to "fu**" or something like this).
Now my question is:
1. can is possible make it with PHP only
- if yes than how to make output textarea value as php string variable?
2. if it's not possible than can I use JavaScript "document.form.textarea.value" as php string variable?
3. if both aren't possible than WHAT SHOULD I DO?
I suppose that I can make it if I save output from textarea in database and than I'll be able use it as string but I really need to make it without saving text from textarea.
Any help will be highly appreciated :(