Neither of those change. You don't have to use stripslashes() on incoming DB data, unless magic_quotes_runtime is ON in php.ini.
---John Holmes... > -----Original Message----- > From: Dreamriver.com [mailto:[EMAIL PROTECTED]] > Sent: Sunday, May 05, 2002 2:33 AM > To: [EMAIL PROTECTED] > Cc: [EMAIL PROTECTED] > Subject: [PHP] Initializing a db $var and retrieving a required CONSTANT > > > Hi Folks, > Two questions: > > 1) Initializing a db $var > What's the best way to code $dbvar, which is coming from a database query, > given the new superglobals: > > $data = mysql_fetch_array(); > $dbvar = stripslashes($data['someFieldName']); > > Is there a newer or better way to initialize $dbvar? > > > 2) retrieving a required CONSTANT > If a CONSTANT is defined on foo.php and called with a > require_once("foo.php") on another page called bar.php, then CONSTANT is > not global and is not called with the new supernotation, but rather same > as before: > > $someVar = CONSTANT; > > ... correct? > > richard. > > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php