<? $xmla = simplexml_load_file('../db/todoist.xml'); if(isset($_GET['token'])){ $token = trim($_GET['token']); $xmla->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; }