eadc Posted April 7, 2007 Share Posted April 7, 2007 Everytime I retrieve text from database into this Textarea, it creates empty spaces before and after the text. When I fill in the text in the textarea I make sure it has no spaces, but still when I retrieve it back into the textarea it show spaces. Database is very simple: num, Smallint(1) mytext, Text Code to retrieve data: <textarea name="mytext" cols="75" rows="15" class="FormFieldText" style="border:1 solid #999999"> <?PHP if ($row[0] =='') //test for empty fields {echo "Sorry, Thought of the Week not defined yet!";} else {echo $row[0];} ?> </textarea> Thanks for your help. Link to comment https://forums.phpfreaks.com/topic/46022-empty-spaces-appear-in-textarea/ Share on other sites More sharing options...
esukf Posted April 7, 2007 Share Posted April 7, 2007 textarea will display the spaces before and after the <?php ?> tags. <textarea name="mytext" cols="75" rows="15" class="FormFieldText" style="border:1 solid #999999"><?php if ($row[0] =='') //test for empty fields {echo "Sorry, Thought of the Week not defined yet!";} else {echo $row[0];} ?></textarea> Link to comment https://forums.phpfreaks.com/topic/46022-empty-spaces-appear-in-textarea/#findComment-223627 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.