i have this cod that insert text to data base, but i need insert the images withe text into data base.
my code ajax like :-
function AddComment(){
var text=$("#text").val();
$.ajax({
type:"post",
url:"application/controllers/process.php",
data:"text="+text+"&action=add",
success:function(data){
showComment();
}
});
}
my form :-
<form>
<input id="inputUpProfile" name="inputUpProfile" class="inputUpProfile hidefile" type="file" onchange="readURL(this)"/>
<img id="blah" src="#" width="100" height="100" style="display:none" />
<textarea name="post" id="text" rows="3" cols="40" onkeyup="textAreaAdjust(this)" style="overflow:hidden"></textarea>
<ol class="controls clearfix">
<input type="button" id="sent" onclick="AddComment();" class="uibutton confirmb" value="Send">
</form>