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.
i have setup a database with.
TABLE - tracks
track_name
track_bpm
track_rate
track_ref
track_special
track_file // This is where i need the uploaded file to go
I am stuck on process here is where i have got so far.
http://html5up.users35.interdns.co.uk/
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
mysql_query("UPDATE tracks SET track_file = '".$file_name."'
WHERE session_id = '".$_SESSION['id']."'");
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.
Is passing a session id the correct way to do this?
Any help please everyone
Advices:
Don’t store files in the database, try to store only paths to the files.