<div class="hideAfterSuccess">
<label for="avatar">Upload an Avatar :</label>
<input type="file" name="avatar" id="avatar" />
</div>
and below is the jquery that has to pass image location to a php function in another file (parsePortal.php). am able to pass other kinds of data o the file but the image failed. i thought since it posts the location string of the image, i would be able to use $_FILES[$_POST['image']]['name'] and then upload the image. i have tried the web, surely, didn't find what i needed.
$(function(){
var imageLoc = $('avatar').val();
var url = "parsePortal.php";
$.post(url, {
status : "getimage",
image : "imageLoc"
}, function(result){
});
});