title: Jquery File upload to database in base64
body: <p>I'm having trouble using the Jquery File uploader with bootstrap skin (<a href="https://github.com/blueimp/jQuery-File-Upload" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload</a>). The program itself works beautifully as is, even with the database which is functional too as described on github (<a href="https://github.com/blueimp/jQuery-File-Upload/wiki/Working-with-databases" rel="nofollow">https://github.com/blueimp/jQuery-File-Upload/wiki/Working-with-databases</a>).</p>
  
  <p>But what I really need is to save the picture in the database in base64 format. I can't seem to get it. So in the add_img function i need to somehow get the pic in base64.</p>
  
  <pre><code>// Standard file uploader code
  function add_img($img_name)
  {
      $add_to_db = $this-&gt;query("INSERT INTO pics (pic_name, pic) VALUES ('".$img_name."','picture in base64 here')");
      return $add_to_db;
  }
  </code></pre>