PHP Magic Quotes





11
Date Submitted Fri. Feb. 17th, 2006 1:14 PM
Revision 1 of 1
Coder mattrmiller
Tags "Magic Quotes" | PHP | Slashes | Strip
Comments 1 comments
This only seems appropriate, we were fighting with a similar issue this morning.


<?php
        function magicSlashes($strString)
        {
                if (get_magic_quotes_gpc() == 1)
                {
                        return ($strString);
                }      
                else
                {
                        return addslashes($strString));
                }
        }
?>

 

Matthew R. Miller

www.bluecreststudios.com
=================
Matthew R. Miller

http://bluecreststudios.com
http://www.codeandcoffee.com

Comments

Comments Easier way
Thu. Jul. 27th, 2006 5:03 AM    Helper rastersize

Voting