function create_db() { $tpl = new templates(); $influx = new influx(); if (!$influx->CREATE_NEW_DATABASE(trim($_POST["new-db"]))) { echo $tpl->javascript_parse_text("{failed}"); return; } }