Jump to content

Recommended Posts

Hey all, im just setting an initial value in my form field and having trouble putting a break under my own text, then the "echo'd" data; im not sure if you can use tags in form fields so if anyone can give me some pointers itd be great, thanks

 

<textarea name="message" type="text" id="message" value="" cols="20" rows="20"style="width:470px;resize:none;">----------------- Original Message -----------------<?php echo $row_reply_msg_id['message']; ?></textarea>

Link to comment
https://forums.phpfreaks.com/topic/107835-solved-form-initial-value/
Share on other sites

Try using the nl2br() function

 

<textarea name="message" type="text" id="message" value="" cols="20" rows="20"style="width:470px;resize:none;">----------------- Original Message -----------------<?php echo nl2br($row_reply_msg_id['message']); ?></textarea>

Hey all, im just setting an initial value in my form field and having trouble putting a break under my own text, then the "echo'd" data; im not sure if you can use tags in form fields so if anyone can give me some pointers itd be great, thanks

 

<textarea name="message" type="text" id="message" value="" cols="20" rows="20"style="width:470px;resize:none;">----------------- Original Message -----------------<?php echo $row_reply_msg_id['message']; ?></textarea>

proper solution:

<textarea name="message" type="text" id="message" value="" cols="20" rows="20"style="width:470px;resize:none;">----------------- Original Message -----------------<?php print "\n";echo $row_reply_msg_id['message']; ?></textarea>

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.