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

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

 



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@xxxxxxxxxxxxxx>:

> 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


[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