title: Image upload, ajax, php, mysql
body: <p>I have one question.
  Is possible upload image from file input to MySQL with Ajax POST and PHP?</p>
  
  <p>Like this:</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
  $(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;
          });
      });
  });
  &lt;/script&gt;
  &lt;form name="form_name" id="form_id" action="#" method="POST"&gt;
      &lt;input type="file" name="image" id="image" /&gt;
      &lt;button&gt;Save&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>