Reply to Re: inserting data via browser(textarea) into database

Your name:

Reply:


Posted by J.O. Aho on 05/29/06 22:18

Tommy DN wrote:
> I just wanted to make something that creates html-code which should be
> inserted in a mysql database.
>
> The user should type text in a textarea. When the user submits the data,
> all enters should be translated into "<br>" and it would be nice if the
> user could also insert links ( "<a href="..." ) in the formular.

new line to <br> is easily done with nl2br()
http://www.php.net/manual/en/function.nl2br.php

For urls you will most likely need to make your own function that uses regexp,
there are a number of functions you can use to transform a web-address into a
anchor.
http://www.php.net/manual-lookup.php?pattern=regexp&lang=en



//Aho

[Back to original message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация