Then change the
fn in my code, to be
file since you call that input field file.
At the same time you can remove the
PHP Code:
if(mysql_query("INSERT INTO images (person_id, name) VALUES (\"".$_POST['person_id']."\", \"".$filename."\")", $DB_LINK))
$message = "Image has been stored: $filename";
else
$message = "Couldn't store image to database";
part, since you're not adding anything to a database, you're simply uploading the image..
Also make sure the
"../images/" reference I have in mine is according to where you plan on locating the images.
And please bear in mind, mine will rename the image files to current seconds since 1970, in order to assure theres no two images stored under the same name.
Altho this all seems to me, like you're just taking whatever code beeing shown, without thinking how it will fit your usage...