Jump to content

[SOLVED] Text Area in forms


lostprophetpunk

Recommended Posts

I have made a simply blog system using PHP, but however I really need to get my textarea's in my forms sorted out.

 

What I have had to do at the moment is use streg_replace() to create a function to allow me to do a new line. But what I am looking for is you know with textarea's, they follow the line along one the text is at the end of that, and carry on, but when the user themselves makes a new line with enter, it will show like that in the outputted text.

 

Such as if I was to put the following text into the textarea...

________________________________

|This will be a single sentence, even  |

|though it is on a new line in the text  |

|area.                                          |

|                                                  |

|This however, will show two lines      |

|below the above text when it is        |

|outputted.                                    |

|________________________________|

 

So the above would show something like...

 

This will be a single sentence, even though it is on a new line in the text area.

 

This however, will show two lines below the above text when it is outputted.

 

Rather than something like...

 

This will be a single sentence, even though it is on a new line in the text area. This however, will show two lines below the above text when it is outputted.

 

...when the data is echoed onto the page.

 

So how would I go about doing this.

Link to comment
https://forums.phpfreaks.com/topic/127195-solved-text-area-in-forms/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.