title: File upload insert into database
body: <p>I am struggling to come up with a process to upload a file with a form i am working on an application that needs the user to upload a file then insert it into a database.</p>
  
  <p>i have setup a database with.</p>
  
  <pre><code>   TABLE - tracks
      track_name
      track_bpm
      track_rate
      track_ref
      track_special
      track_file // This is where i need the uploaded file to go
  </code></pre>
  
  <p>I am stuck on process here is where i have got so far.
  <a href="http://html5up.users35.interdns.co.uk/" rel="nofollow">http://html5up.users35.interdns.co.uk/</a></p>
  
  <p>I am looking at doing a you tube style filling out the form while your file uploads, the file could be up to 2gig, then insert file when completed into sessions id here is a snippet of my file-upload.php</p>
  
  <pre><code>mysql_query("UPDATE tracks SET track_file = '".$file_name."'
  WHERE session_id = '".$_SESSION['id']."'");
  </code></pre>
  
  <p>Can someone please help me with the correct process or at least a decent tutorial or way off doing this correctly been Googling for ages.</p>
  
  <p>Is passing a session id the correct way to do this?</p>
  
  <p>Any help please everyone</p>