RE: [PEAR] MDB2 autoExecute escaping data

From: Date: Sun, 07 Oct 2007 15:42:35 +0000
Subject: RE: [PEAR] MDB2 autoExecute escaping data
References: 1  Groups: php.pear.general 
Request: Send a blank email to pear-general+get-28064@lists.php.net to get a copy of this message
I think I'm checking for that, here's the code I am running: // convert to html entities $html = htmlentities( $_POST['content'], ENT_QUOTES ); // check if magic quotes gpc is on, remove slashes if( get_magic_quotes_gpc() ) { $data = stripslashes( $html); } // then use real escape function $html= mysql_real_escape_string( $html); $field_values['content'] = $html; $mdb->autoExecute( 'tableName', $field_values ); -----Original Message----- From: brian [mailto:brian@zijn-digital.com] Sent: Sunday, October 07, 2007 5:36 PM To: pear-general@lists.php.net Subject: Re: [PEAR] MDB2 autoExecute escaping data Mark Steudel wrote: > Hi All, I thought I've asked this before but couldn't find it in the > archives, and couldn't find it in the pear docs. > > I having problems with extra slashes showing up in my data and was wondering > if mdb2 by default does it's own escape strings when using autoExecute? > I don't think so. Have you checked whether or not magic quotes is enabled? if (get_magic_quotes_gpc()) ... brian -- PEAR General Mailing List (http://pear.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.pear.general (#28064) next »