Virtual Brain Online Logo

Bookmark: Root \ PHP \ Adjust html Text box according to how much input comes from the database

Adjust html Text box according to how much input comes from the database


Last Updated: 2005-12-13

Since text boxes make it easy to display text, I like using them when I display form for printing. For this to work properly all text boxes need to be adjusted dynamically. No problem.

I like storing the data in my database with \n as new lines. The script below will count all \n.

$arearows = (3 + count(explode("\n",$Service_Performed )) );
if ( empty($Print) ) {
$areacols = 75; }
else {
$areacols = 90; }
echo('<textarea cols="'.$areacols.'" rows="'.$arearows.'" tabindex="5" name="Service_Performed">
Originally Posted by Skylinux @ 2005-12-13 01:22:12

 

No Comments yet .....

 

Add Your Comment:

Note: All posts require administrator approval. Please allow 24 hours for message approval.

Name:
E-Mail:
Title
Plain text only, less then 65 000 characters.

How many apples does Peter have left if Peter has 25 apples but little Jane eats one of his apples?

Please answer the question above and type the answer into the text box below.