Re: Slashes
| From: | Ng Hwee Hwee | Date: | Wed, 10 Dec 2003 03:58:51 +0000 |
| Subject: | Re: Slashes | ||
| References: | 1 2 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-31955@lists.php.net to get a copy of this message | ||
Hi John,
thanx!...
HH > but why is it that I still get a backslash
HH > before an occurrence of a single-quote?
HH > for example,
HH > <td width="630" height="6"><? echo $fieldName; ?></td>
HH > where $fieldName is retrieved from the database through:
JH > Maybe magic_quotes_runtime is enabled? It will add slashes to data from
JH > files and databases. Bottom line, if you actually see the slashes in
JH > your data, in your database, then you're adding the slashes twice,
somehow.
yes, i see the slashes in my database through PHPMyAdmin, but my
magic_quotes_runtime is set to OFF. I did not do anything fancy to my data
except cleaning away spaces infront and at the end of the value and doing a
EscapeShellCmd() to my value through:
$value = trim(EscapeShellCmd($fieldName));
and then i do a $query= "insert into table set name='$value'";
i swear i did not add any slashes twice (at least for what i know!!).. is
there another way that i could have addslashes twice without my knowing??
thanx thanx!!
rgds,
hwee