RE: [PHP-DB] mysql_real_escape_string for HTML <p>???

From: Date: Sun, 06 Mar 2005 14:16:37 +0000
Subject: RE: [PHP-DB] mysql_real_escape_string for HTML <p>???
References: 1  Groups: php.db 
Request: Send a blank email to php-db+get-38784@lists.php.net to get a copy of this message
Hi Ron Use nl2br()...its adds in <br /> tags. The other option is to use str_rplace and replace the characters with ones of your choice bastien
From: "Ron Piggott" <ron.php@actsministries.org> To: "PHP DB" <php-db@lists.php.net> Subject: [PHP-DB] mysql_real_escape_string for HTML <p>??? Date: Sat, 5 Mar 2005 23:21:14 -0500 I know of the $variable = mysql_real_escape_string($variable); It works just nicely to allow some of the wild cards to be saved to a mySQL table. Is there something like this for HTML that when you retrieve from a variable in the table an ENTER would be converted to <P> I am mainly talking about when the variable is defined as "longtext" and you are expecting the user to write a few sentences or where they may s/he may press ENTER to start a new line. Ron -- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


« previous php.db (#38784) next »