Re: quotes
| From: | hugh danaher | Date: | Fri, 12 Apr 2002 22:15:13 +0000 |
| Subject: | Re: quotes | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-92816@lists.php.net to get a copy of this message | ||
Heidi,
to your input:
addslashes()
to your output:
stripslashes()
Hope this helps,
Hugh
----- Original Message -----
From: "Heidi Belal" <hmbelal@yahoo.com>
To: "CF-Talk" <cf-talk@houseoffusion.com>; "Egypt Developers"
<egypt-developers@yahoogroups.com>; "Egypt Programmers"
<egypt-programmers@yahoogroups.com>; "js-jive mailing list"
<js-jive@yahoogroups.com>; "Php" <php-general@lists.php.net>
Sent: Friday, April 12, 2002 3:06 PM
Subject: [PHP] quotes
> Dear All,
> I'm facing a problem and can't figure out the solution
> and would love anyones help.
> the situation is this:
> i have a form for users to fill, i take their entry
> and enter it in the database, then i take it and
> display it in a form so they can edit it.
> the problem is this:
> if uses enter double quotes my html gets mixed up and
> considers the users quote to be the end of the output
> value for the input field.
> Example:
>
> <form>
> <input type="text" value="myvalue">
> </form>
> myvalue is a variable which is read from the DB and
> contains a double quote now if
> myvalue = this is a double quote " like this.
>
> the output html will look like this:
> <input type="text" value="this is a double quote "
> like this.">
>
> and the output like this:
> this is a double quote
>
> and that's it..cause it took the double quote as the
> end of the value field.
>
> now what do i do? how can i prevent that from
> happing?
> Thanks,
>
>
>
> =====
> Heidi Belal
> www.code-corner.com
> ICQ# 32127109
>
> A bus stops at a bus station.
> A train stops at a train station. On my desk
> I have a work station...
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Tax Center - online filing with TurboTax
> http://taxes.yahoo.com/
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>