views:

16

answers:

1

Hello,

can anyone guide me how to upload a file thorugh ajax

when users click on Upload, i'm opening a div and users click on submit button, i'm calling an ajaxfile

upload :

1) How can i get these values in javascript ?

$name = $_FILES['profile']['name']; $temp = $_FILES['profile']['tmpname'];

so that i can pass to the ajaxfile and do the necessary functionality...

Am i going in a correct way ?

Thanq

A: 

Make an ajax request to php script which returns these data.

http://www.ajaxf1.com/tutorial/ajax-file-upload-tutorial.html - tutorial about uploading files with ajax.

azram19