For Programmers: Free Programming Magazines  


Home > Archive > PHP Pear > March 2005 > DataObject adding extra slashes









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author DataObject adding extra slashes
Dan Rossi

2005-03-30, 3:59 am

It has come to my attention, when I used setFrom($_POST)

some of the data is already adding slashes to quotes when posted,
DataObject however is already adding slashes is there a way to stop
this ?

Here is something in a function i had used for generating sql from post
arrays, it was dodgy but worked :|

if (!get_magic_quotes_gpc()) {
$vals .= "'".addslashes($value)."'".$delimiter;
} else {
$vals .= "'".$value."'".$delimiter;
}


should this be patched to dataobject or MDB2 or DB quote method ?
Sponsored Links







Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive

Copyright 2008 codecomments.com