RE: [PHP] I lied, another question / problem

From: Date: Wed, 17 Jan 2007 03:26:55 +0000
Subject: RE: [PHP] I lied, another question / problem
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-247194@lists.php.net to get a copy of this message
> $formerror = array(); > > ... do your validation here which may/may not add to the array. > > if (!empty($formerror)) { > echo "Something went wrong!"; > print_r($formerror); > } else { > echo "Everything is ok!"; > } As I said the problem is that a value is being returned, how I check it is really not an issue as I know there is value there. I guess I need to figure out how to only return something if there is an error, and not return anything if there is no error, or just totally revise the way I am doing this period. I have corrected the problem, but it is messy and it is cumbersome, but it will have to do until I can work out something better. At least now I can take my time and work on this. I appreciate all the suggestions and maybe I can incorporate some of them once I do a rewrite.

« previous php.general (#247194) next »