FabrikaHradekTour/res/forum/api/get_username.php

6 lines
157 B
PHP

<?php
session_start();
header('Content-type: application/json');
if (isset($_SESSION["username"])) echo json_encode(["username" => $_SESSION["username"]]);