By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
455,722 Members | 1,194 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 455,722 IT Pros & Developers. It's quick & easy.

PHP5 and "isset"

P: n/a
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($ordernumber)) { $ordernumber = '123456'; }

....be changed to this:

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

Thanks!

Jul 17 '05 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Westcoast Sheri wrote:
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($ordernumber)) { $ordernumber = '123456'; }

...be changed to this:

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


Use empty() to be on the safe side.

Berislav
Jul 17 '05 #2

This discussion thread is closed

Replies have been disabled for this discussion.