Page 1 of 1

Trouble with a form text field lenght

Posted: Mon May 28, 2007 2:37 pm
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!

Posted: Mon May 28, 2007 4:49 pm
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

Thx Henrie

Posted: Mon May 28, 2007 9:24 pm
by Tieckus
Thanks a lot! :D