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
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • 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.