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

From: Date: Mon, 22 Nov 2004 20:57:23 +0000
Subject: Re: $_POST['xxx'] = "blabla" ?
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-202698@lists.php.net to get a copy of this message
Jay Blanchard wrote:
[snip] What is the difference between these two examples? Both works fine for me. 1. if ($_POST['submit'] == 'Login') { ... ... } 2. if (isset($_POST['submit']) { ... ... } [/snip] One is checking if $_POST contains a specific value, the other just checks to see if it contains a value. If $_POST['submit'] contains 'foo' is ISSET. Make sense?
Maybe a daft question but why would you like to check for a specific value? Can you give an example when this is a good thing to do? /PJ

« previous php.general (#202698) next »