Form with Text Area

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
ut1205
Forum Commoner
Posts: 32
Joined: Thu Jan 29, 2004 5:12 pm

Form with Text Area

Post 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? :?:
User avatar
hawleyjr
BeerMod
Posts: 2170
Joined: Tue Jan 13, 2004 4:58 pm
Location: Jax FL & Spokane WA USA

Post by hawleyjr »

Code: Select all

<textarea name="textfield" cols="60" rows="6"><?php echo $remarks ?></textarea>
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

ut1205
Forum Commoner
Posts: 32
Joined: Thu Jan 29, 2004 5:12 pm

Post by ut1205 »

Works great! Thanks. Still don't know what I was doing wrong.
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post 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.
Last edited by Joe on Fri Aug 06, 2004 5:24 pm, edited 1 time in total.
User avatar
ol4pr0
Forum Regular
Posts: 926
Joined: Thu Jan 08, 2004 11:22 am
Location: ecuador

Post by ol4pr0 »

Code: Select all

#this 
value="<? echo $remarks ?>"></textarea>
#instead of this
rows="6"><?php echo $remarks ?></textarea>
User avatar
Joe
Forum Regular
Posts: 939
Joined: Sun Feb 29, 2004 1:26 pm
Location: UK - Glasgow

Post by Joe »

Well theres two decent explinations for you ut1205 :D
Post Reply