prepare("UPDATE users SET username = ?, email = ?, phone = ?, group_id = ?, status = ? WHERE id = ?"); $stmt->execute([$username, $email, $phone, $group_id, $status, $id]);'; $repl_edit_post = '$status = $_POST[\'status\'] ?? \'active\'; $outlet_id = !empty($_POST[\'outlet_id\']) ? (int)$_POST[\'outlet_id\'] : null; if ($id && $username) { $stmt = db()->prepare("UPDATE users SET username = ?, email = ?, phone = ?, group_id = ?, status = ?, outlet_id = ? WHERE id = ?"); $stmt->execute([$username, $email, $phone, $group_id, $status, $outlet_id, $id]);'; $c = str_replace($find_edit_post, $repl_edit_post, $c); file_put_contents('index.php', $c); echo "Edit Post Patched\n";