PHP5 and "isset"

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Westcoast Sheri

    #1

    PHP5 and "isset"

    When "register globals" is set to "on," has anyone noticed if PHP
    Version 5 affects the usage of "isset" or not?

    For example, in a webpage form, should the following code:
    if (!isset($ordern umber)) { $ordernumber = '123456'; }

    ....be changed to this:

    if (!isset($orderi d) || $orderid==NULL) { $ordernumber = '123456'; }

    Thanks!

  • Berislav Lopac

    #2
    Re: PHP5 and "isset&quo t;

    Westcoast Sheri wrote:[color=blue]
    > When "register globals" is set to "on," has anyone noticed if PHP
    > Version 5 affects the usage of "isset" or not?
    >
    > For example, in a webpage form, should the following code:
    > if (!isset($ordern umber)) { $ordernumber = '123456'; }
    >
    > ...be changed to this:
    >
    > if (!isset($orderi d) || $orderid==NULL) { $ordernumber = '123456'; }[/color]

    Use empty() to be on the safe side.

    Berislav


    Comment

    Working...