Re: AW: AW: [PHP] MORE QUESTION - Editing Database

From: Date: Fri, 11 Jan 2002 03:21:42 +0000
Subject: Re: AW: AW: [PHP] MORE QUESTION - Editing Database
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-80135@lists.php.net to get a copy of this message
Hi ! How do I allow HTML entries into my database? I tried to insert a pre-formated text into my database. When I pull the data out and put it in a text field the formating is still there, HOWEVER when I retrive the record from the database using "echo" all the text formating is gone and it became just a straigh line. What function should I use in this case??? Could anybody please help? Thank you! Dani > Hi Dani, > > For sure you can use a database. There are two ways of using your pr > formatted text. > > 1)Allow HTML-entries for your database. Because the bullets you have > used in your mail are from a list-tag (<li></li>), aren’t they? By > that way you the user has two know HTML. > > 2)Use simple entries. For example: Instead of the bullets you have > used, just use “-“ as prefix for your list-item. Don’t use HTML-tags! > > Putting into the database is very easy. Because it doesn’t matter if > there’s any whitespace in the entry. In my opinion you should use as > type something like tinytext or text (MySQL !!!). The text-type allows > entries with a size of about 65.000 bytes (65.000 letters !!). > > I hope I could help you again. > > Bye, Marcel > > P.S.: Sorry for my bad english, but the last time I really needed it > was in school (about 7 years ago !!!) > > -----Ursprüngliche Nachricht----- > > Von: Dani [mailto:universal2001@iprimus.com.au] > Gesendet: Donnerstag, 10. Januar 2002 18:57 > An: Marcel Besancon > Betreff: Re: AW: [PHP] MORE QUESTION - Editing Database > Wichtigkeit: Hoch > > Hi Marcel ! > > if for example I have got a pre formated text like this: > > Tour > Adventure Tour > > * Adult $123 > * Children $123 > * etc > > Because later when a user edit this online, the text will be displayed > on a web form (input text). I'm not sure that we can still preserved > the format of the text when we try to insert it back to database. > > so...is it still possible???? > > Should I use BLOB as the type of the data in my database or > ......???? > > Thank you so much for your reply! It helps me to understand more > > Sincerely, > Dani >

« previous php.general (#80135) next »