<? $xmla = simplexml_load_file('todoist.xml'); if($xmla->token== '' || $xmla->token == null) header('Location: index.php'); if($xmla->name == '' || $xmla->name == null):?> <html> <head> <title>Todoist : getProjects</title> <script type="text/javascript" src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript" src="js/getProjectsList.php?token=<?=$xmla->token?>"></script> </head> <body> </body> </html> <? else: header('Location: getUncompletedTasks.php'); endif;