connect(); $project = new Project($db); $project->name = $name; $project->liveAttributes = $liveAttributes; $project->baseUrl = $baseUrl; if (!empty($_FILES['file'] ?? null)) { $project->file = $_FILES['file']['tmp_name'];; } $status = $project->create(); $tempObject = new stdClass(); $tempObject->status = $status; echo json_encode($tempObject); }