RE: PHP-CLI issue

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Rob,

Works like a charm! Much appreciated.

 
 
 
Thanks,
 
Jesse Hazen

-----Original Message-----
From: Robert Cummings [mailto:robert@xxxxxxxxxxxxx] 
Sent: Wednesday, March 18, 2009 7:24 AM
To: Hazen, Jesse, arvato digital services llc
Cc: php-general@xxxxxxxxxxxxx
Subject: RE:  PHP-CLI issue

On Wed, 2009-03-18 at 07:10 -0700, Jesse.Hazen@xxxxxxxxxxxxx wrote:
> Rob,
> 
> Thanks for the quick reply. I did try that before, but now my issue is
> that the if-else section does not recognize the data as being valid.
So,
> I changed it to fgets(), and reran, this time using valid data. The
> initial problem is corrected (it only gives the error once), but now
it
> does not recognize my data, and I get the error once no matter what I
> input. Is there anything in particular I would need to do to the
> variable, after the STDIN, to prepare it for the validation?

Use trim() to trim the retrieved input since it will have the newline
appended to it. Then you can do your comparison.

Cheers,
Rob.
-- 
http://www.interjinn.com
Application and Templating Framework for PHP


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php



[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux