RE: mysql_real_escape_string for HTML <p>???

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxxxxx>
To: "PHP DB" <php-db@xxxxxxxxxxxxx>
Subject:  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


-- PHP Database Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [PHP Users]     [Postgresql Discussion]     [Kernel Newbies]     [Postgresql]     [Yosemite News]

  Powered by Linux