Upload pic and insert different values in database using jquey


I wanna update my database and upload picture in my folder after rename the pic but the problem is when i tried to send simple value get from text fields,radio button and check box its working fine but when i wanna upload pic using this it not working

code is here

<input type=“text” name=“film_title” size=“45” id=“film_title”/>
<input type=“text” name=“film_release_date” id=“film_release_date” />
<input type=“radio” name=“film_industry_language” value=“Urdu” id=“Urdu” class=“film_industry_language” /><label for=“Urdu”>Urdu</label>
<input type=“checkbox” name=“film_genre” value=“Action” id=“Action” class=“film_genre” /><label for=“Action”>Action</label>
<input type=“checkbox” name=“film_genre” value=“Adventure” id=“Adventure” class=“film_genre”/><label for=“Adventure”>Adventure</label>
<input type=“file” size=“50” name=“film_image” id=“film_image”/>

<input type=“submit” value=“submit whole film info” name=“submit” id=“save_button” class=“submitm”/><span id=“save_status”></span>

<script language=“javaScript” type=“text/javascript” src=“js/jquery.js”></script>
<script language=“javaScript” type=“text/javascript”>
var film_title = $(‘#film_title’).val();
var film_release_date = $(‘#film_release_date’).val();
var film_industry_language = $(‘.film_industry_language’).val();
var film_image = $(‘#film_image’).val();
var film_genre=“”;
film_genre += $(‘#Action’).val() + "
film_genre += $(‘#Adventure’).val() + "
film_genre += $(‘#Animation’).val() + "
film_genre += $(‘#Biography’).val() + "

	$.post('ajax/add-new-film-form-ajax.php',{ film_title: film_title , film_release_date:film_release_date , film_industry_language:film_industry_language, film_genre:film_genre, film_image:film_image }, function(data){


i don’t wanna us <form> because when i use this <form> refresh my page can anyone help me to get image_name, image_tmp name…



You can’t upload images with ajax because the multipart submissions required for file uploads aren’t supported by XMLHttpRequest.
I’ve had some success using this plugin to dynamically create a hidden iframe and submit with that, it’s not that straightforward but it does work.

thanks for helping me…now its working fine but now i have one more small problem

I wanna redirect my use to his/her post she/he just make but when i use iframe he show my threat down my form page…
help me in this how can i redirect use to require page on same tab