check out he php manual for file uploads. Nice and simple.
Assume DB connection details already given
$dest = "images/" . basename( $_FILES['uploadimg']['name']);
if(move_uploaded_file($_FILES['uploadimg']['tmp_name'], $dest)){
$r=mysql_query("INSERT INTO table SET fname='$dest'");
//you could add more info to the query eg from $_POST variables from the upload form
//do any mysql error handling here
}else{
echo "Error with upload";
}
diafol
Rhod Gilbert Fan (ardav)
7,792 posts since Oct 2006
Reputation Points: 1,170
Solved Threads: 1,080