PHP: POST method uploads - Manual[
^]
PHP 5 File Upload[
^]
You're trying to open the file given its path
on the client. You need to open the file using the temporary path
on the server where the uploaded file was saved.
Replace:
if(isset($_POST['fname'])){
$value = $_POST['fname'];
}
with:
$value = $_FILES["fname"]["tmp_name"];