Jump to content

(help)Auto Complete chars in a form


nicx

Recommended Posts

<?php
// $input contains user input

function add_whitespace($input) {
    $zeros = 160 - str_len($input);
    $buf = "";

    for ($x=1,$x<$zeros;$x++) {
      $buf = $buf . " ";
    }

    return $input . $buf;
}
?>

how with this:

<?php

 

echo "Text:<br />

    <textarea name=\"message\" maxlenght=\"160\"></textarea><br/>";

 

// $input contains user input

 

function add_whitespace($message) {

    $zeros = 160 - str_len($message);

    $buf = "";

 

    for ($x=1,$x<$zeros;$x++) {

      $buf = $buf . " ";

    }

 

    return $message . $buf;

}

 

?>

 

only changes $input to $message ?? Thats true? Plz keeB answer plz hehe

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.