[eluser]coldfire82[/eluser]
Hi,
I have a html form with File fields in it to browse/upload the file. I call this form via xajax in a div.
Now, what I need is to get the $_FILE variable values in javascript/CI code behind.
e.g. my html form (dummy, ignore any problem with it.)
Code:
<form>
<input type='file' id='file1'/>
<input type='image' id='userimg1'>
</form>
in JS
Code:
function upload_iamge(){
// get userimg1 value();
xajax_upload_image(some_userimg1_value);
}
my xajax registered function in .php file
Code:
funciton upload_image(file_variable){
// the same objresponse.
//get file upload variable and upload to a directory.
//here, i have to get values for the below FILE variables like,
$name = $_FILES['userimg1']['name'];
$temp_name = $_FILES['userimg1']['tmp_name'];
$size = $_FILES['userimg1']['size'];
// and then return back the success/fail message in a div
}
Has anyone done file upload with xajax and CI ? If yes, then help please
Thanks.