Im not going to give you a script.. But help you out a little
First Uploading
Look in the manual..
for either copy or move_uploaded_file(); My suggestion is move_uploaded_file cos it works if safe mode is on. Its also supposably more secure.
Now remember your directory that needs to be uploaded to must be accurate.. So one spelling error could wreck the whole script. And not display an error(I doubt it.. Most likely will say. Directory doesnt exist or something)
Also that directory must be chmod 777
then from there you'd get a var like
say the upload form bit is called pic.
we'd beable to make a new var called $pic_name That will get rid of C:\the files from computer that sent file\etc
And give you something like pic.jpg
You can also read up on getimagesize i think thats it..
filesize as well to make sure filesizes are ok by you. Format as well with explode.
I guess uploading is the hard part
If you want it inserted to the db. Not hard
just do what you'd normally do..
If you want the image html code to be inserted to the database..
Try this..
$picture="<img src=path/to/file/uploaded/to/file>";
then
mysql_query("INSERT INTO blah (id,pic) VALUES('NULL','$picture')");
hope that helps ya.