recover text area from form (solved)

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
thosecars82
Forum Commoner
Posts: 94
Joined: Thu Apr 03, 2008 6:31 am
Location: Arganda, Madrid
Contact:

recover text area from form (solved)

Post by thosecars82 »

Is there any way to recover the current content of a text area from a form without using javascript, just with php?
Last edited by thosecars82 on Sun May 25, 2008 11:12 am, edited 1 time in total.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: recover text area from form

Post 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?
LSJason
Forum Commoner
Posts: 45
Joined: Mon May 12, 2008 4:43 pm

Re: recover text area from form

Post 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>';
?>
 
thosecars82
Forum Commoner
Posts: 94
Joined: Thu Apr 03, 2008 6:31 am
Location: Arganda, Madrid
Contact:

Re: recover text area from form

Post 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.
User avatar
califdon
Jack of Zircons
Posts: 4484
Joined: Thu Nov 09, 2006 8:30 pm
Location: California, USA

Re: recover text area from form

Post 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.
Post Reply