Textarea retrieves PHP with 12 extra spaces
Posted: Tue Aug 22, 2006 3:18 pm
I've noticed that when my textarea retrieves text from the mysql database it automatically adds 12 spaces at the end of the text for some reason. This is annoying as if I click to upload whatever is in the textarea it is sent to my database and the text on the database will also have 12 spaces at the end of it.
Any ideas? Attached is the code for the textarea.
Leao
Any ideas? Attached is the code for the textarea.
Leao
Code: Select all
<form method="post" action="meetthecommunity.php">
<div align="center">
<p>
<textarea name="meetthecommunity" cols="43" rows="14" id="meetthecommunity"><?php
mysql_connect("mysql","username","password") or die(mysql_error());
mysql_select_db("database_text") or die(mysql_error());
$result = mysql_query("SELECT * FROM grid")
or die(mysql_error());
$row = mysql_fetch_array( $result );
echo $row['meetthecommunity'];
?>
</textarea>
</p>
<p>
<input type="submit" value="upload text">
</p>
</div>
</form>