addChild("token", $token); $xmla->asXML('../db/todoist.xml'); echo $token; }else if(isset($_GET['name']) && isset($_GET['id'])){ $name = trim($_GET['name']); $id = trim($_GET['id']); $xmla->addChild("name", $name); $xmla->addChild("id", $id); $xmla->asXML('../db/todoist.xml'); echo $id; }