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 <[EMAIL PROTECTED]>:
> 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
>
>
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php