Page 1 of 1

recover text area from form (solved)

Posted: Sat May 24, 2008 9:49 am
by thosecars82
Is there any way to recover the current content of a text area from a form without using javascript, just with php?

Re: recover text area from form

Posted: Sat May 24, 2008 12:40 pm
by califdon
thosecars82 wrote:Is there any way to recover the current content of a text area from a form without using javascript, just with php?
I don't understand what you want to do. PHP is a server-side language. When it runs, there is no page in anyone's browser yet. What text area are you referring to? Something in the current PHP script?

Re: recover text area from form

Posted: Sat May 24, 2008 11:31 pm
by LSJason
Do you mean you want to recover the text that was entered into the form before, in the event that you have to report an error to the user? In that case, you could simply do:

Code: Select all

 
<?php
 echo '<textarea name="TEXTAREANAME">'.$_REQUEST['TEXTAREANAME'].'</textarea>';
?>
 

Re: recover text area from form

Posted: Sun May 25, 2008 5:28 am
by thosecars82
Ok, I understand. Thanks both of you, I was wrong. I need javascript as califdon said. I want to mark this post as solved or close it but I do not know how.

Re: recover text area from form

Posted: Sun May 25, 2008 11:00 am
by califdon
If you are logged in to the forum, just go back to your original post and click on the "Edit" button, you should be able to edit the Subject.