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,427 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 56
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,427 posts since Jan 2012
Reputation Points: 822
Solved Threads: 473
Skill Endorsements: 56