<form enctype="multipart/form-data" method="post" action="action/go_photo.php">
<input type="file" name="uploadfile" id="img">
<label for="img"> Выбрать</label>
<input type="submit" value="Загрузить">
</form>
$myimg = './img/' . basename($_FILES['uploadfile']['name']);
if (move_uploaded_file($_FILES['uploadfile']['tmp_name'], $myimg)) {
// сохраняем путь в базу
}