Ok maybe i shoule post this in a new topic but its tied to the same image loader so ill post my issue below.
So i have a backend where the admin user can go in and edit users.
right now i use the code below to access the users
function getUser($id) {
$id = (int) $id;
$query = mysql_query("SELECT * FROM users WHERE ID = '$id'") or die(mysql_error());
return mysql_fetch_assoc($query);
}
in the edit user screen i call
$user = getUser($_GET['id']);
at the top and then use
<input type="text" name="username" class="input with_corners" value="<?php echo $user['Username']; ?>" />
to call the data from the database to display that users current users info..
so i figured if i did this
echo "<img src='$user['Avatar'] width='100' height='100'>";
it should display the image but i get this error
Parse error: syntax error, unexpected T_ENCAPSED_AND_WHITESPACE, expecting T_STRING or T_VARIABLE or T_NUM_STRING
on the line above...
?