FORM ELEMENTS!

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
xEzMikex
Forum Commoner
Posts: 38
Joined: Sat Jan 21, 2006 10:18 pm
Location: Canada

FORM ELEMENTS!

Post by xEzMikex »

allright I use

<input size="70" class="form" style="height:500px;" type="text" name="content">

but when i type content i can only type one line and when i press enter it doesnt go to a second like it stays in one.
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

What do you mean?
User avatar
feyd
Neighborhood Spidermoddy
Posts: 31559
Joined: Mon Mar 29, 2004 3:24 pm
Location: Bothell, Washington, USA

Post by feyd »

I want a textarea.

Code: Select all

<textarea name="content" cols="70" style="height:500px" class="form"></textarea>
xEzMikex
Forum Commoner
Posts: 38
Joined: Sat Jan 21, 2006 10:18 pm
Location: Canada

Post by xEzMikex »

will it work the same?
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

Yes it will be the same input wise.

An example of a text area is the box you respond in for the forums.
xEzMikex
Forum Commoner
Posts: 38
Joined: Sat Jan 21, 2006 10:18 pm
Location: Canada

Post by xEzMikex »

allright working good... but now it still goes in a line how to i make it so it auto line breaks?
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

you will need to use wordwrap
there are several of them.

:arrow: http://www.faqs.org/docs/htmltut/forms/ ... _WRAP.html
xEzMikex
Forum Commoner
Posts: 38
Joined: Sat Jan 21, 2006 10:18 pm
Location: Canada

Post by xEzMikex »

thanks sir's
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

No Problem, and welcome to the forums! :D
User avatar
John Cartwright
Site Admin
Posts: 11470
Joined: Tue Dec 23, 2003 2:10 am
Location: Toronto
Contact:

Post by John Cartwright »

you can also use nl2br() to convert new lines to line breaks
User avatar
nickman013
Forum Regular
Posts: 764
Joined: Sun Aug 14, 2005 12:02 am
Location: Long Island, New York

Post by nickman013 »

yeah that would work too.
Post Reply