<?php
// Initialize the session
session_start();
 
// Check if the user is logged in, if not then redirect him to login page
if(!isset($_SESSION["loggedin"]) || $_SESSION["loggedin"] !== true){
    header("location: me");
    exit;
}

require_once "config.php";
$sql = "SELECT  balance FROM users WHERE username='".$_SESSION['username']."'";
$result = $conn->query($sql);
$row = mysqli_fetch_array($result);
$balance=round($row[balance],2);
if($balance==0){
    echo "&nbsp$balance.00 ";
}else{
   echo "&nbsp$balance";
}

?>