Jump to content

PHP 5.3 Varible is not defined


gocondo

Recommended Posts

This is just a warning when you switch to PHP 5.3, you'll start seeing NOTICE messages on your page if you access a variable which is not exist or initialize. For example

 

$id=($_GET["id"]);

if ($id='home)

 

If there is no value to id because it's not part of the link, you'll get an error. These kind of notice messages are not shown in PHP 5.2.

 

~ Go Condo Toronto ~

Link to comment
Share on other sites

You had those errors turned OFF in 5.2, and your upgrade reverted them back to the defaults.

 

This is why the isset() function exists.

 

Also, you typed this by hand, but you're using the wrong number of equals signs in your IF check, and unnecessary parens in your $_GET access.

 

-Dan

Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.