473,466 Members | 1,397 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

BR's in a textarea?

Hi,

I have a form with a textarea. When I try to get the content using e.g.
$_POST["textfieldname"] the BR's are stripped out? How could this be fixed?

Greetz,

Roger
Jul 17 '05 #1
2 6980
Roger Godefroy wrote:
I have a form with a textarea. When I try to get the content using e.g.
$_POST["textfieldname"] the BR's are stripped out? How could this be fixed?


<?php
$fixed = nl2br($_POST["textfieldname"]);
?>

Check the manual: http://www.php.net/nl2br
[for some reason this URL is not working for me right now]

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.
Jul 17 '05 #2
thnxz... didn't know about the newline formatting...

"Pedro" <he****@hotpop.com> schreef in bericht
news:bl************@ID-203069.news.uni-berlin.de...
Roger Godefroy wrote:
I have a form with a textarea. When I try to get the content using e.g.
$_POST["textfieldname"] the BR's are stripped out? How could this be
fixed?
<?php
$fixed = nl2br($_POST["textfieldname"]);
?>

Check the manual: http://www.php.net/nl2br
[for some reason this URL is not working for me right now]

--
I have a spam filter working.
To mail me include "urkxvq" (with or without the quotes)
in the subject line, or your mail will be ruthlessly discarded.

Jul 17 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Christopher Finke | last post by:
I have a site wherein the clients can update the individual pages by editing the text of that page in a <textarea>. Then, when the page is displayed, all of the newlines (\n) are converted to HTML...
13
by: Tomba | last post by:
hi there, I am looking for a way to convert line breaks that are written in a textarea (with an enter) to <br> to create the same line break in html is there anyone who can help me with this?...
1
by: Volt | last post by:
is there any way to select and mark part of text in textarea by regular expression? i need to select the first string in textarea whitch is like xxxxx,xxx where x is any character
4
by: TJS | last post by:
can the rows and columns of a textarea element with an id be changed on the fly ? if so is there an example ?
13
by: CK | last post by:
Hi all, I have a textarea control. I am putting it's value in an html email. The problem is that the new lines are being ignored. I want to take the controls value and replace any newline...
1
by: susikaufmann2003 | last post by:
Hello, i have a html text, where it is possible (using ajax) to edit the text by clicking on it. The text is then shown in a textarea. My problem is, that the newlines are not displayed in the...
2
by: xhe | last post by:
I met a very headache problem in javascript, I think this might be difference between IE and NS / Safari. I have a text area <form> <textarea name='tex1' onkeyup='displayit();'></textarea>...
11
cheezylu
by: cheezylu | last post by:
I'm working on a site where my client will be able to maintain some of the text on the site using input boxes and such driven by PHP and MySQL. The problem I am running into is making it easy for...
8
luke14free
by: luke14free | last post by:
Hello, I'm creating a form to let user leave comments, I'm having a problem, because I need to convert all the \n to <br/>. After several tries I came out with this simple function <script...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.