Jump to content

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
Link to comment
https://forums.phpfreaks.com/topic/12330-textarea-formatting/
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]
Link to comment
https://forums.phpfreaks.com/topic/12330-textarea-formatting/#findComment-47126
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

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.