michaelkirby wrote:Would I then have to put that into a variable e.g.
$imagepath = "upload/" . $_FILES["file"]["name"]
You could if you want, or you could just use the string pieces themselves without creating another variable. For example, I like using [man]sprintf/man for queries that take up a lot of space (visually), e.g.:
$sql = sprintf("INSERT INTO myTable (path, name) VALUES ('%s', '%s')",
"upload/" . mysql_real_escape_string($_FILES["file"]["name"]),
mysql_real_escape_string($_POST['name'])
);
michaelkirby wrote:and could I put this insert statement at the end of the upload script?
You could put it anywhere you want (though you might want to wait until you validate the upload and successfully moved it to its permanent location).