Re: $_POST['xxx'] = "blabla" ?
| From: | Angelo Zanetti | Date: | Tue, 23 Nov 2004 07:16:46 +0000 |
| Subject: | Re: $_POST['xxx'] = "blabla" ? | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-202713@lists.php.net to get a copy of this message | ||
I speak under correction but the reason could be that if someone tries to hack your site, for
example I post to your HTML page, you want to check it your $_POST contains a certain variable
(which may be hidden)
Not really sure besides that
>>> Perry Jönsson <public@combinative.se> 11/22/2004 10:57:23 PM >>>
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
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--------------------------------------------------------------------
Disclaimer
This e-mail transmission contains confidential information,
which is the property of the sender.
The information in this e-mail or attachments thereto is
intended for the attention and use only of the addressee.
Should you have received this e-mail in error, please delete
and destroy it and any attachments thereto immediately.
Under no circumstances will the Cape Technikon or the sender
of this e-mail be liable to any party for any direct, indirect,
special or other consequential damages for any use of this e-mail.
For the detailed e-mail disclaimer please refer to
http://www.ctech.ac.za/polic or call +27 (0)21 460 3911