texterea issue

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
vlio20
Forum Commoner
Posts: 26
Joined: Sat Jun 02, 2012 6:46 am

texterea issue

Post by vlio20 »

Hi,
I have create a texterea wich body i save on my data base, but when I print it out to the screen (again in texerea tag) I have a big white space at the beginning:
here is a photo:
Image

here is the code:

Code: Select all

<textarea id="massage_body" name="message_in" cols="80" rows="7" maxlength="5000" value="">
						<?php 
						echo "$bodyIn"; ?>
					</textarea>

I tried using trim function. it didn't helped:
vlio20
Forum Commoner
Posts: 26
Joined: Sat Jun 02, 2012 6:46 am

Re: texterea issue

Post by vlio20 »

it should be Message Received
User avatar
Celauran
Moderator
Posts: 6427
Joined: Tue Nov 09, 2010 2:39 pm
Location: Montreal, Canada

Re: texterea issue

Post by Celauran »

All the space between <textarea> and <?php gets included in the text box. This should fix it:

Code: Select all

<textarea id="massage_body" name="message_in" cols="80" rows="7" maxlength="5000"><?php echo $bodyIn; ?></textarea>
vlio20
Forum Commoner
Posts: 26
Joined: Sat Jun 02, 2012 6:46 am

Re: texterea issue

Post by vlio20 »

Thanks
Post Reply