Re: textarea information

From: Date: Wed, 16 Apr 2003 07:10:54 +0000
Subject: Re: textarea information
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-144186@lists.php.net to get a copy of this message
This is not a php question. Is more html. Search a manual of html online. Use google.com. You might use "html+manual" or "html+reference" as keywords. A php response for a near php question asked is down the message. http://www.w3.org/TR/html4/ is a good source too. Well is the specification of the html. Or search the site. Any way the response is here, just to help. The value in a textarea is diferent from a textbox. The handling on JavaScript is the same. The textarea is designed to set a pre-formated (presented inside of the input as using the <pre></pre> tags) text on a web page, and mostly big amout of data (eg. a description, an observation,...). The value of a textarea is between the tags. Experiment yourself. Try this on a page and you will see the diference. <br> <input type="text" size="20" name="textinput" value="Start Value"><br> <br> <br> <textarea rows="10" cols="50" name="textareainput1"> Start Value </textarea> <br> <br> <textarea rows="10" cols="50" name="textareainput2">Start Value </textarea> <br> <br> <textarea rows="10" cols="50" name="textareainput3" value="Start Value"> </textarea> Observation: <input> is not allowed to have a </input>. <textarea> must have </textarea> ---------->This is php: To hide a textarea value try <input type=\"hidden\" value=\"$textareavalue\">, or something similar. Read html (I don't remember now how goes). Is not necesary to include exactly the same type of control you used, as long as the information is transmited as wanted. Be careful to do this if the amount of transmited chars is big because the size of the resultant file and the memory use. It is also a thing here. The 'textarea' control gives the information including the \r\n chars, and other (as acuted letters or umlauted) that are "forbiden" as to say for include into a text file as the htlm format is and migh mispell the interpretation from the browser. It might be a function that I don't know to transmit this special chars into the variable not affecting the result. A way I can see (and this is untested and untried for me) is to convert this $textareavalue (<- from the $_POST obtained value into a variable) into base64 [imap_binary()] text and keep it until it is used, and then unconvert the value from base64 [imap_base64()] to use as you wanted. Greetings and please, if it worked, send a message to know what you did. Mario Soto mario_s@amigo.net.gt -.-.-.- ----- Original Message ----- From: "Diksha Neel" <diksha_neel@rediffmail.com> To: <php-general@lists.php.net> Sent: Sunday, April 13, 2003 4:58 AM Subject: [PHP] textarea > hi everybody, > > i want to know if the 'value' and 'name' attribute > of textarea operate just like textbox or not. > > in a form in a php page i have the following: > > <textarea name=descrip1 rows=5 cols=60 > name=\"descrip1\"></textarea> > > the first form is posted to the next which tries to > retrieve the value of the above textarea as follows: > > <textarea name=descrip1 rows=5 cols=60 > value=\"$descrip1\"></textarea> > > but i am not getting the value of textarea of the first form > retrieved in the second. > > wanted to know if what i have written is correct. > > thanks, > diksha. > > _______________________________________________________________________ > Odomos - the only mosquito protection outside 4 walls - > Click here to know more! > > http://r.rediff.com/r?http://clients.rediff.com/odomos/Odomos.htm&&odomos&&wn > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php >

« previous php.general (#144186) next »