PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
You're close, but you closed the if block "conditional" immediately after the !isset() part. Moving that closing parenthesis to the end of that line will correct the problem:
marvolo1300 wrote:Thanks it worked. I also figured out that i don't need to check if login cookie exists.
If you're concerned about proper programming and not generating E_NOTICES for non-existent variables, then yes, you do need to check at some point before attempting to use/compare the variable.
mysql_function(): WARNING: This extension is deprecated as of PHP 5.5.0, and will be removed in the future. Instead, the MySQLi or PDO_MySQLextension should be used. See also MySQL: choosing an API guide and related FAQ for more information.