I don't know the proper term, so i can only try to describe it...
the idea of someone accessing a URL which leads directly to a page from the "middle" of one of your apps-- instead of the start of the app where the user would begin to complete text input, etc.
My instinct to code for this is probably not far from what most of you would do in this situation, and i've received advice about this before-- but, i've never been confident by my understanding of these similar but different Variable Handling Functions.
discourse i'm hoping for here is to get a better understanding of the purposeful useage of the following (or at least one of the following functions)
isset()
empty()
defined()
if someone will humor me, maybe we'd start off w/ isset()
i see that i've used this in the past, and, supplemental to reading at php.net, i likely received instruction here to use it as so, yet it still seems unclear -- because of when i've seen in practice, so...
if (isset($variable, variable2, variable3, $_POST['var_one'])
am i right to say that here, we use isset to check whether the variable holds data, and in the case that it doesn't, isset prevents the "Undefined Constant" error? i realize it either returns TRUE or FALSE-- but... Why do we care? i mean-- why not just use something like
if ($var > '') { do something } else { do something else
does that not check for a value in the $var, and it would seem even more versatile as we get to define the actions if true or false w/ the regular variable.
i was in the habit of using if (empty($_POST['my_name_field']) {
or if (!empty($_POST[... etc , but i see isset() used more often, so this is primarily why i feel i just don't get it. i have definitely thrown more errors w/ isset() than i have w/ empty()
sorry if this is really laughable, but it's difficult for me to perceive the important, key differences here-- and when and why one is used instead of the other.
thanks!