note 83534 modified in function.get-magic-quotes-gpc by danbrown

From: Date: Sun, 20 Jul 2008 00:05:54 +0000
Subject: note 83534 modified in function.get-magic-quotes-gpc by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-141823@lists.php.net to get a copy of this message
<?php function stripper($stringvar){ if (1 == get_magic_quotes_gpc()){ $stringvar = stripslashes($stringvar); } return $stringvar; } ?> Usage: $Body = stripper($rs->fields('Body')); echo($Body); This checks if get_magic_quotes_gpc() is on and strips a string variable for output if its on. Useful if the dev server and live server are set up different. --was-- function stripper($stringvar){ if (1 == get_magic_quotes_gpc()){ $stringvar = stripslashes($stringvar); } return $stringvar; } Usage: $Body = stripper($rs->fields('Body')); echo($Body); This checks if get_magic_quotes_gpc() is on and strips a string variable for output if its on. Useful if the dev server and live server are set up different. http://php.net/manual/en/function.get-magic-quotes-gpc.php

« previous php.notes (#141823) next »