Re: $_POST['xxx'] = "blabla" ?

From: Date: Mon, 22 Nov 2004 20:45:52 +0000
Subject: Re: $_POST['xxx'] = "blabla" ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202694@lists.php.net to get a copy of this message
Dear u r correct, Both r same... but in first case ur variable with a constant string value And in second case u r checking that your variable is set or not but one limitation with the function is that.. "isset() only works with variables as passing anything else will result in a parse error." But second cace is more effective and it takes less time when u go 4 large comparisions Thnx... Ankur PHP Developer INDIA Quoting Perry Jönsson <public@combinative.se>: > Hello, > > What is the difference between these two examples? > Both works fine for me. > > > > 1. if ($_POST['submit'] == 'Login') { > ... > ... > } > > 2. if (isset($_POST['submit']) { > ... > ... > } > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > >

« previous php.general (#202694) next »