Image upload, ajax, php, mysql -
i have 1 question. possible upload image file input mysql ajax post , php?
like this:
<script type="text/javascript"> $(document).ready(function(){ $("button").click(function(){ $("#form_id").submit(function(){ $.ajax({ type:"post", data:image_data, url:"/path_to_php/imagesave.php", success: function(msg){ alert("ok"); } }); return false; }); }); }); </script> <form name="form_name" id="form_id" action="#" method="post"> <input type="file" name="image" id="image" /> <button>save</button> </form>
upload file , store on database can done several ways. this 1 tutorial doing this.. problem if want using ajax, possible, check out common browser doesnt support it, solution is:
- using iframe: check tutorial
- using jquery plugin check article
Comments
Post a Comment