Ok i have tried this over and over and nothing seems to be working... so I came up with a new idea..
This works fine
echo "{$_SERVER['PHP_AUTH_USER']}";
So why can't I use this to select the relevant data??
I tried to run a query like this :
<?php
session_start();
require_once ('mysql_connect.php');
$sql = 'SELECT HP FROM users WHERE username = {$_SERVER['PHP_AUTH_USER']}';
$res = mysql_query($sql) or die("Query Error: ".mysql_error());
$data = mysql_fetch_array($res) or die("Fetch Error: ".mysql_error());
$hp = $data[HP];
?>
I keep getting errors... what is the correct way to put
{$_SERVER['PHP_AUTH_USER']}
into the the place of username to be used in the query to select the data??