Re: checking for null form fields fails

From: Date: Tue, 07 Aug 2001 15:23:02 +0000
Subject: Re: checking for null form fields fails
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-61638@lists.php.net to get a copy of this message
on 8/7/01 2:43 AM, Renze Munnik at renze@datalink.nl wrote: > On Mon, Aug 06, 2001 at 12:31:38PM -0700, Mark Maggelet wrote: >> i can't tell if it's just a email formatting thing, but if there's a >> line break in the onsubmit string it might mess things up. > > It no _might_ mess things up... It sure does! Good one. > But... another thing. You just might want to consider using braces. > They're not invented for nothing. When you call functions (like > return) you should use braces. Especialy when you start writing more > complex scripts, the not using any braces, is just the thing that > may because a lot of trouble. a couple things. although i agree with the general notion of using braces, return is not a function (the manual calls it a statement), and atleast from what i can find in the manual it doesn't take braces. http://www.php.net/manual/en/functions.returning-values.php also from that page - "You can't return multiple values from a function, but similar results can be obtained by returning a list." i'm not really sure what the difference is between function, statement and language construct (which is what echo is). syntactically, i know that functions require parentheses. with echo, the manual says you _cannot_ use parantheses if you are echoing more than one thing. http://www.php.net/manual/en/function.echo.php -- mike cullerton

« previous php.general (#61638) next »