Jump to content

[SOLVED] Help with undefined variable


limitphp

Recommended Posts

I have this notice:

Notice: Undefined variable: logout in C:\wamp\www\inc_login_script.php on line 11

 

I understand I can turn off these notices, but most of you have suggested I fix them instead.

 

Here's my code for that line:

 

//log user out
if ($logout=="yes")//***********	DESTROY SESSION, DELETE COOKIE, DELETE ENTRY
{
//code here
}

 

I guess its giving me this notice because there will be sometimes when logout doesn't have a value.  How should I fix this notice?

 

thanks

Link to comment
https://forums.phpfreaks.com/topic/171983-solved-help-with-undefined-variable/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • 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.