xR34P3Rx xR34P3Rx - 1 year ago 48
SQL Question

Queried TEXT incomplete in Textarea

I am making a form that edits a user's post on a website i am making. An issue that i currently have is that the page queries the content of the user's post and inserts it into a

just as the user wrote it BUT the first chunk of the post is gone and only shows the rest of what the user wrote. Example if the user wrote 2 paragraphs, posts it then goes to the website and see's his post, it shows up just fine. However when the user goes into his Control Panel and edits his post, the page queries the post by title, queries the content of the post but only the second paragraph is inserted into the

I tried increasing the number of rows of the
thinking it was running out of rows but it didnt change a thing. Then i set the max length of the
but that as well had no effect. I even
'd what was being queried out of the
into the
tags and it all appeared just fine!

This is my form, and its posted how
'ing it:

echo "<form action=\"update_sermon.php\" method=\"post\" id=\"postform\">";
echo "<sert>SERMON TITLE: <input type=\"text\" id=\"sermon_name\" name=\"sermon_name\" value=\"$title\"></input></sert><br>";
echo "<cont>CONTENT:<br><textarea cols=\"85\" rows=\"25\" maxlength=\"60000\" name=\"sermon_content\" value=\"$content\"></textarea></cont><br>";
echo "<publish><input type=\"submit\" value=\"Update\" id=\"submit\"></input></publish>";
echo "</form>";

Thanks in advance!

Answer Source

Try placing the content between delimiters:

<textarea>**CONTENT HERE**</textarea>

like so:

echo "<textarea cols=\"85\" rows=\"25\" maxlength=\"60000\" name=\"sermon_content\">$content</textarea>";

Instead of using the value atribute