Re: MySQL/PHP Form & Addslashes() command
| From: | JJeffman | Date: | Fri, 26 Jan 2001 19:28:16 +0000 |
| Subject: | Re: MySQL/PHP Form & Addslashes() command | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-6212@lists.php.net to get a copy of this message | ||
There is the "nl2br()" function too :
// From php manual :
nl2br -- Converts new lines to HTML line breaks.
Description
string nl2br(string string);
Returns string with '<BR>' inserted before all new lines.
HTH
Jayme.
http://www.conex.com.br/jjeffman
-----Mensagem Original-----
De: Rubanowicz, Lisa <lisa.rubanowicz@cnh.com>
Para: 'James Smith' <ff8_az@yahoo.com>; <php-db@lists.php.net>
Enviada em: sexta-feira, 26 de janeiro de 2001 07:59
Assunto: RE: [PHP-DB] MySQL/PHP Form & Addslashes() command
> I am a beginner but did it like this, with a little help from my friends!!
> $query = "INSERT INTO guests ";
> $query .= "(guest_id, guest_name, ";
> $query .= "guest_email, guest_time, guest_message) ";
> $query .= "values(0000, '$name', '$email', NULL, '" .
> str_replace("\n","<br>", $message) . "')";
>
> Where $message is the TEXTAREA box submitted
> All the best
> Lisa
>
> -----Original Message-----
> From: James Smith [mailto:ff8_az@yahoo.com]
> Sent: Thursday, January 25, 2001 8:50 PM
> To: php-db@lists.php.net
> Subject: [PHP-DB] MySQL/PHP Form & Addslashes() command
>
>
> Alright, you have a textarea in a form, say some one
> right this:
>
> Today, during the meeting blah blah blah... (now they
> want to start a new paragraph, so they press enter
> twice.)
>
> After the construction meeting blah blah blah...
>
> Ok... Now the question. The addslashes() command
> won't add the NULL spots to make it a new paragraph
> when you open this row in a page. How do I get that
> to work...
>
> Thank You,
>
> James Smith
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Auctions - Buy the things you want at great prices.
> http://auctions.yahoo.com/
>
> --
> PHP Database Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
> For additional commands, e-mail: php-db-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
>