Re: Magic quotes question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



PS.  How does htmlspecialchars fit into this.  The unprep function is
to prepare date coming from the database to be used in <input
type=text, douse the below function make sence?

Ben  

function unprep( $text ) {
  	// Take data coming from the database an get it ready to be presented 
  	// to the user.
  	
   if (magic_quotes_gpc()){
     $result = stripslashes($text);
   }
   else{
     $result = $text;
   }   
   
   return htmlspecialchars( $result );
}
--
Ben Edwards - Poole, UK, England
WARNING:This email contained partisan views - dont ever accuse me of
using the veneer of objectivity
If you have a problem emailing me use
http://www.gurtlush.org.uk/profiles.php?uid=4
(email address this email is sent from may be defunct)

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux