Which part of it is troubling you?
Pointers:
You use an input type=file form element to upload the file; Make sure your form is:<form action=\"index.php\" enctype=\"multipart/form-data\" method=\"POST\">
Use [man]move_uploaded_file[/man] to move the file to a specific location
Add a filename to the record in the database
with print_r($_FILES); you can see all the information that was sent for the file, after uploading (In the processing page, so to speak)