I don't know what you're using for your HTML form, but let's say you have an input field as follows:
<input type="file" name="picture" />
Once you've selected the file on your PC to upload to the web server, your PHP script will process it. That's where the two functions that I mentioned:
is_uploaded_file
move_uploaded_file
come into work. The function is_uploaded_file verifies that you file has been uploaded as specified in the superglobal $FILES. Example:
if ( (isset($_FILES['picture']['name']) &&
is_uploaded_file($_FILES['picture']['tmp_name'])))
{ // more code to follow
Assuming you the condition is true, you next move your file to a permenant location on your web server since you do not want to simply dumpy all uploaded file to one place on your web server and leave it there. example:
move_uploaded_file($_FILES['picture']['tmp_name'], $base_dir.$filename);
At this point, you can use an INSERT statement to insert into the db with the variable $filename (in my example) being the path to your file. You are not INSERTing the actual image, but the reference (path) that points to the image.
Take a look again at the manual. The PHP manual has pretty clean examples and if you Google a little bit, you should be able to piece these suggestions together. Also, search PHPBuilder forums since, as you know, this is not an uncommon script.
HTH.