Grrr quotes
| From: | Marij Bellen | Date: | Wed, 10 Apr 2002 11:00:10 +0000 |
| Subject: | Grrr quotes | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-18378@lists.php.net to get a copy of this message | ||
Hello, i have a little problem with quotes:
- first a have a textarea in a form
- second i'm gonna check this textarea
- if all checks sussesfull I process the data, so no straings thing get in
my database or whatever (function see below)
Problem: if I get the data out of the database I sometimes get problems that
make funny '&' characters of quotes and if im wright also from alt-keys
(like for example a euro-sign ).
EUR -> €
I do this with code before into database:
------------------------------------------------------------
$beschrijving = ereg_replace("\n","<br>",
ereg_replace("`","
",htmlentities("$beschrijving")));
this piece of code is in the form (the <br> will be pulled out first)
----------------------------------------------------------------------------
-------------------
<? $beschrijving = ereg_replace("<br>", "", $beschrijving); ?>
<textarea name="beschrijving" rows="10" cols="50"><? echo
$beschrijving
?></textarea>
How is it possible i get these funny &-signs.
I think it has something to do with the htmlentities() i'm using.
Is there a way to translate them back or something?
Thanks