Jump to content

Archived

This topic is now archived and is closed to further replies.

natalieG

textarea formatting

Recommended Posts

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 the
field 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

Share this post


Link to post
Share on other sites
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.

Share this post


Link to post
Share on other sites
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]

Share this post


Link to post
Share on other sites

×

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.