Date: 07/31/02
- Next message: Jason Wong: "Re: [PHP] I cannot use mail() ?!?"
- Previous message: Andrew Chase: "RE: [PHP] Creating Image..."
- In reply to: Nathan Kline: "[PHP] text area with quotes"
- Next in thread: Justin French: "Re: [PHP] text area with quotes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
addslashes($st); before you put the string into the d-base
stripslashes($str); after you retrieve the string from the d-base
Otherwise MySQL is going to do its best to limit the illegal characters on
its own. :)
-Kevin
----- Original Message -----
From: "Nathan Kline" <mitb <email protected>>
To: <php-general <email protected>>
Sent: Wednesday, July 31, 2002 1:50 PM
Subject: [PHP] text area with quotes
> this seems so obvious yet it is giving me problems.
>
> I have a text area in a form that is passed to a php page to be
> written to a database. first though It displays the contents of the
> form in a preview page. then if everything is good the user click the
> button and it write to the DB. I pass the contents of the text area
> straight to the next page (i.e. $form_item_name) so i never mess with
> the variable.
>
> now for the problem.
>
> when it displays the variable it adds the escape character (\) to any
> ' or " in the text. if I resend the same document it adds more. how
> do i get it to display 's and "s in a variable without php adding the
> \??
>
>
> --
> Nathan Kline
> i.e. Man in the Box
> mitb <email protected>
>
> --
> 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
- Next message: Jason Wong: "Re: [PHP] I cannot use mail() ?!?"
- Previous message: Andrew Chase: "RE: [PHP] Creating Image..."
- In reply to: Nathan Kline: "[PHP] text area with quotes"
- Next in thread: Justin French: "Re: [PHP] text area with quotes"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]

