I have a PHP variable with this value:
$myText="I wan't \"this\" to write to 'my' textbox!";
Writting this to HTML...
<input type="text" name="myText" value="<?php echo $myText;?>">
So the problem is " (double quote) because it will not written my whole text into textbox - it will written only to the first double quote so I will have written I wan't
I have in database written value of $myText variable and I wan't to show it in textbox in order to edit it. So what I need to do to transform this text to show correctly?
Do I need to use everytime htmlspecialchars?
How do you solve this problem? Also for searching, when user enters double quotes, i.e. "test" I want to find all these strings (included double quotes) "test".
Thanks.