How do i create paragraph spaces in my 'imput text Field '

Hello everyone

i am a bit confused over this issue.

i have a text imput field in which user can write a bio about themselves;



<textarea   name="essay" cols="30" rows="15"
        style="font-family: Tahoma; width: 420px;    font-size: 12pt"
            />


Although i am able to receive all the information imputted by the user, it does not leave any paragraph space. i.e if the user presses the ‘sift key’ while writing, thus creating ‘white space’, this is not saved when the information is sent to my database.

what am i doing wrong; is there a way to generate automatic paragraph tags within the imput filed?

thank you for your help

Andreea

Lets say your form is POSTed to the form handler.


<?php

// echoed without doing anything about new lines

echo $_POST['essay'];

// compared to :

echo nl2br($_POST['essay']);

Does that help?

Wow. that is great.

my warmest thanks to Cups for the function that creates line breaks .

it works perfectly.

thank you.