This was working but stopped afterwards.
Other fields have no issue submitting.
When I press submit the other fields are added to the database but this one is not.
To prevent confusion the value that matters is photo_url not photo_dir.
Further clarification: photo_dir is the value of a drop down menu with a compass direction. All I want is to store the file name in the DB under column photo_url.
This is the form field
<label for="photo_url">Upload:</label>
<input type="file" name="photo_url">
This is the SQL
$sql="INSERT INTO photo(photo_project_id,photo_section,photo_subsection,photo_date,photo_post,photo_desc,photo_url,photo_dir)VALUES('$_POST[photo_project_id]','$_POST[photo_section]','$_POST[photo_subsection]','$_POST[photo_date]',now(),'$_POST[photo_desc]','$_POST[photo_url]','$_POST[photo_dir]')";
The file is also being uploaded to the server which is working without issue. Though I would like to be able to rename them to datetime() but that is a topic for a different day.