Welcome Guest, Not a member yet? Register   Sign In
handling input file with js + codeigniter
#1

[eluser]e.abubakr89[/eluser]
Hi all

When I need to handle data of html form and post it to php server using ajax, I used regular ways to post values of inputs of myform after storing it in var

i.e, to handle an input text
Code:
var myval = $('#elementId').val()

but the problem is when I have an input file in my form
Code:
<input type="file" name="userfile" id="userfile"/>
How can I post the file to php server , or any way to enable php server to handle and upload the file with other input boxes without refreshing the current page (as Ajax technique is) ?!

Help please
#2

[eluser]toopay[/eluser]
Some quickstart tutorial




Theme © iAndrew 2016 - Forum software by © MyBB