Line breaks lost from start of textarea?
Posted: Fri Feb 11, 2011 1:49 pm
Hello
Im having trouble keeping preceeding linefeeds in an textarea.
Look at this test page
http://www.wurlygig.co.uk/test.php
The code for this page is very simple...
<?
$t = $_POST['t'];
?>
<html>
<body>
<form action="" method="POST"
<textarea rows="10" cols="60" name="t"><?=$t?></textarea>
<br/>
<input type="submit">
</form>
</body>
</html>
Enter a couple of linefeeds and then some random text, then hit submit, each time you submit a linefeed is lost?
Why is it doing this and how can I fix? My application requires preceeding linefeeds in textarea fields.
Thanks
Jake
Im having trouble keeping preceeding linefeeds in an textarea.
Look at this test page
http://www.wurlygig.co.uk/test.php
The code for this page is very simple...
<?
$t = $_POST['t'];
?>
<html>
<body>
<form action="" method="POST"
<textarea rows="10" cols="60" name="t"><?=$t?></textarea>
<br/>
<input type="submit">
</form>
</body>
</html>
Enter a couple of linefeeds and then some random text, then hit submit, each time you submit a linefeed is lost?
Why is it doing this and how can I fix? My application requires preceeding linefeeds in textarea fields.
Thanks
Jake