Remove slashes function


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

Removes the automatic slashes from POST & GET data if it finds Magic Quotes is activated.


Copy this code and paste it in your HTML
  1. function remSlash($varvar) {
  2. $varRem = stripslashes($varvar);
  3. }
  4. else {
  5. $varRem = $varvar;
  6. }
  7.  
  8. return $varRem;
  9. }
  10.  
  11. // Ex.: $no_slash = remSlash($_POST['name']);

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.