Where is your avatars folder relative to the root folder? If the file is there, it sounds like the problem is as simple as getting the path correct in your img tag.
deceptikon
Challenge Accepted
3,499 posts since Jan 2012
Reputation Points: 822
Solved Threads: 481
Skill Endorsements: 58
it's there
(xampp/htdocs/test/test001/avatars/)
That may be your problem then. $location is set to "avatars/$name", but your avatars folder is two levels down from htdocs, where the server is looking. Unless you're using something like mod_rewrite, $location should be "test/test001/avatars/$name". Or better yet:
$location = IMAGE_PATH . "avatars/$name";
Where IMAGE_PATH is a manifest constant that holds "test/test001/".
deceptikon
Challenge Accepted
3,499 posts since Jan 2012
Reputation Points: 822
Solved Threads: 481
Skill Endorsements: 58