PHP smarty sticky form value


/ Published in: PHP
Save to your folder(s)

To avoid script injection attacks an input value requires proper escaping.


Copy this code and paste it in your HTML
  1. # turn off global magic quotes in .htaccess
  2. php_flag magic_quotes_gpc Off
  3.  
  4. # in your smarty template...
  5. <input type="text" value="{$some_user_input|escape:'htmlall'}">

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.