Trouble with a form text field lenght

Everything that doesn't belong to any other forum but this one. If it doesn't belong here then it ... well, it just doesn't.

Moderator: mkoch227

Post Reply
Tieckus
Posts: 4
Joined: Mon Jan 29, 2007 12:06 am

Trouble with a form text field lenght

Post by Tieckus »

Script URL:
Version of script:
Hosting company:
URL of phpinfo.php:
URL of session_test.php:
What terms did you try when SEARCHING for a solution:

Write your message below:

Hi!

I hope somebody can help me. I am a newbie and I think that this is probably a very easy to answer question. I am trying to modify one of PHP JY scripts adding the following form:

<?PHP
{
echo "</br>";
echo "<form ACTION=comment.php METHOD=POST>";
echo "Post a comment:";
echo "<input type=text name=comment>";
echo "<input type=submit>";
echo "</form>";
}
?>

My question is: How can I set a specific length for the text field in that form?

The length of the text field is too big and it spoils the layout.
Thanks for your help!

Tieck!
Henrie
Posts: 1095
Joined: Sun Aug 14, 2005 8:57 pm

Post by Henrie »

To change the length,
Change

Code: Select all

echo "<input type=text name=comment>";
to

Code: Select all

echo "<input type=text name=comment size='18'>";
In this , the size="18" gives the field a length af 18 visible characters.

Greetings,
Henrie
Tieckus
Posts: 4
Joined: Mon Jan 29, 2007 12:06 am

Thx Henrie

Post by Tieckus »

Thanks a lot! :D
Post Reply