Hello,

I'm looking for a way to make a simple multi line text box in PHP. I am trying to make a text box a couple thousand characters log. but when i try to create it, it just makes a very long text box. I can't seem to find any information on how to make that a multi line box. I don't care if you can use line returns or not.

I'm very very new to PHP.

Recommended Answers

All 4 Replies

I'm a bit confused by your request. Text boxes are generated in html and the data sumbitted is used by the PHP script. If you want to display a text box on a .php page, simply close the php tags and create an html form. I use the <textarea> tag to create mine. You can open and close the <?php tags whenever you like throughout the page. When the tag is closed ?> you can treat the file like a normal html page.

If that isn't what you meant post more details and I'll try to troubleshoot with you. Hope that helps.

Zechieo - Lanslide Gaming PCs:
The <FAKE SIGNATURE>Built For LAN Parties

^yes. <textarea> can be used to create multi-line text box

My fault. I am very new to all of this.. I think I figured it out though. After looking a little more around on the net.. I am creating an html form. I was using the textarea tag wrong.

The only thing that i can't seem to figure out. Is there a way to limit the size of the textarea in characters?

You would have to use JavaScript I beleive I don't think the textarea allows the maxlength attribute.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.