natalieG Posted June 18, 2006 Share Posted June 18, 2006 we use the below line in a form to initialize a textarea with $NOTE which is the gotten from a database query in mysql. the first line is indented about 1/2 the textarea width. all other lines are fine. As far as we know, there are no tabs or other formatting characters in the textarea. we tried to use echo trim($NOTE) but that does not solve the issue. the contents of thefield is not indented. we get the value by $NOTE=$ROW[NOTE};[!--coloro:#FF6666--][span style=\"color:#FF6666\"][!--/coloro--][b]<tr><td width="664" COLSPAN="2"><textarea name="NOTE" rows="20" cols="85" tabindex="1"> <?php echo $NOTE;?></textarea></td>[/b][!--colorc--][/span][!--/colorc--]We tried the php forum, but dod nopt got what we expected, so perhaps it is an html issue.Thanks,Jennifer Quote Link to comment https://forums.phpfreaks.com/topic/12330-textarea-formatting/ Share on other sites More sharing options...
bobleny Posted June 18, 2006 Share Posted June 18, 2006 Umm, try replacing "<?php echo $NOTE;?>" with a literal. Take the literal text from $NOTE and place it there and see if you get the same results. Quote Link to comment https://forums.phpfreaks.com/topic/12330-textarea-formatting/#findComment-47119 Share on other sites More sharing options...
bobleny Posted June 18, 2006 Share Posted June 18, 2006 I've been working on creating a PHP forum and I just added my edit post featuer to it. The code for a specific spot goes like this...[code] <textarea name="message" cols="70" rows="15" wrap="soft" maxlength="500"> <?php echo $_POST['message']; ?> </textarea>[/code]When I tested it I found that I had a huge space infront of my message. Sound familliare? Its because I have 5 tabs after the opening <textarea> tag and it traslated over to the inside of my box. I got rid of the spaces and it works fine now.Do you have any space? eg.[code]<textarea attributes=""> {white space or an enter} </textarea>[/code] Quote Link to comment https://forums.phpfreaks.com/topic/12330-textarea-formatting/#findComment-47126 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.