Why do I need the isset() function in php?
Posted
by Chris
on Stack Overflow
See other posts from Stack Overflow
or by Chris
Published on 2010-03-17T06:36:21Z
Indexed on
2010/03/17
6:41 UTC
Read the original article
Hit count: 151
I am trying to understand the difference between this:
if (isset($_POST['Submit'])) {
//do something
}
and
if ($_POST['Submit']) {
//do something
}
It seems to me that if the $_POST['Submit'] variable is true, then it is set. Why would I need the isset() function in this case?
© Stack Overflow or respective owner