Page 1 of 1

Form with Text Area

Posted: Thu Aug 05, 2004 3:16 pm
by ut1205
I have a form which uses a text box to show a default entry from a MYSQL database. Code is:

<INPUT TYPE=TEXT Name="Remarks" SIZE=40 value="<? echo $remarks ?>"> This works fine but it puts everything on one very long line.

I want to make this a "text area" for 60 columns wide by 3 or 4 rows high which also inserts $remarks from above statement but I'm doing something wrong. I get the text box but nothing is in it.

Any suggestions? :?:

Posted: Thu Aug 05, 2004 3:18 pm
by hawleyjr

Code: Select all

<textarea name="textfield" cols="60" rows="6"><?php echo $remarks ?></textarea>

Posted: Thu Aug 05, 2004 3:27 pm
by Joe

Posted: Fri Aug 06, 2004 5:21 pm
by ut1205
Works great! Thanks. Still don't know what I was doing wrong.

Posted: Fri Aug 06, 2004 5:24 pm
by Joe
Still don't know what I was doing wrong
Well you were using an input tag whereas the examples given by hawleyjr and myself used a textarea tag. hehe.

Posted: Fri Aug 06, 2004 5:24 pm
by ol4pr0

Code: Select all

#this 
value="<? echo $remarks ?>"></textarea>
#instead of this
rows="6"><?php echo $remarks ?></textarea>

Posted: Fri Aug 06, 2004 5:31 pm
by Joe
Well theres two decent explinations for you ut1205 :D