fgets, not fread....
echo ( "What is your name?\n" ); $name = fgets ( STDIN ); echo ( "Hello, " . $name );
John Nichel wrote:
I did that orginally, but it waits for me to enter 255 characters before closing the fread....no matter how many times I hit enter.
Benny Pedersen wrote:
On Wednesday 02 April 2003 03:17, John Nichel wrote:
if I do a... $name = fread ( STDIN, sizeof ( STDIN ) );
$name = fread ( STDIN, 255 );
tryit :)
-- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php