There is such code:
<input name="name" value="<?= $name ?>"> the problem is that when displaying the name with "" the data is displayed incorrectly, what to do in this situation, $ name can be any composition
the problem is that when displaying the name with "" the da...">
There is such code:
<input name="name" value="<?= $name ?>"> the problem is that when displaying the name with "" the data is displayed incorrectly, what to do in this situation, $ name can be any composition
<input name="name" value="<?=htmlspecialchars($name);?>"> The function replaces quotes with " . When outputting in markup, everything will remain. I apply markup as proof.
<input name="name" value="Раз два "три""> I had a similar problem. All output before quotes. Decided to translate the VARCHAR field into the TEXT field
Source: https://ru.stackoverflow.com/questions/822720/
All Articles