Miguel Guirao wrote:
One approach is to ask the user to input a text delimiter, like a "@", for
example, in every point where there should be a new line or paragraph.
Then, you should parse the text, and at every point you find a "@", tu place
a "<BR>" or "<P>" or any other HTML tag that best suits your need!!
This is just one solution, but I'm pretty sure there others!!
Mike Guirao
-----Original Message-----
From: Alex Major [mailto:alex.major@xxxxxxxxxxxx]
Sent: Jueves, 12 de Enero de 2006 10:33 a.m.
To: php-db@xxxxxxxxxxxxx
Subject: Formatting a form box
Hi there,
On one of my forms, there is a section where users can put images etc..and
then it is displayed on my php pages. My question is how do I make it so
that the html formatting is automatically done. For example when someone is
typing something, and wants to start a new paragraph although they press
return when typing when the data is displayed from the MySQL database on a
website it's just continuous text. For it to start a new paragraph they have
to put <p> in when they are typing in this box. They do not know all the
html formatting codes, and so I need someway of making so that it is easy
for them to have formatted text without doing all the html.
Also things like changing colours, bold, italic and things would be good.
Something like on forums, where when you enter a new post you have all the
formatting options.
Hope this makes sense,
Regards,
Alex.
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
Este mensaje es exclusivamente para el uso de la persona o entidad a quien esta dirigido; contiene informacion estrictamente confidencial y legalmente protegida, cuya divulgacion es sancionada por la ley. Si el lector de este mensaje no es a quien esta dirigido, ni se trata del empleado o agente responsable de esta informacion, se le notifica por medio del presente, que su reproduccion y distribucion, esta estrictamente prohibida. Si Usted recibio este comunicado por error, favor de notificarlo inmediatamente al remitente y destruir el mensaje. Todas las opiniones contenidas en este mail son propias del autor del mensaje y no necesariamente coinciden con las de Radiomovil Dipsa, S.A. de C.V. o alguna de sus empresas controladas, controladoras, afiliadas y subsidiarias. Este mensaje intencionalmente no contiene acentos.
This message is for the sole use of the person or entity to whom it is being sent. Therefore, it contains strictly confidential and legally protected material whose disclosure is subject to penalty by law. If the person reading this message is not the one to whom it is being sent and/or is not an employee or the responsible agent for this information, this person is herein notified that any unauthorized dissemination, distribution or copying of the materials included in this facsimile is strictly prohibited. If you received this document by mistake please notify immediately to the subscriber and destroy the message. Any opinions contained in this e-mail are those of the author of the message and do not necessarily coincide with those of Radiomovil Dipsa, S.A. de C.V. or any of its control, controlled, affiliates and subsidiaries companies. No part of this message or attachments may be used or reproduced in any manner whatsoever.
The nl2br() function is way better because you don't change email adressess.
And for the colours and stuff... just put a small note on the bottom of
your post page what HTML tags they are allowed to use.
Greets, El Bekko
--
PHP Database Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php