Posted By

eeppeliteloop on 03/23/08


Tagged

slashes quote quotes magic slash


Versions (?)

Who likes this?

1 person have marked this snippet as a favorite

mb


Remove slashes function


 / Published in: PHP
 

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

  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  

You need to login to post a comment.