Q:

File not saving in images directory

I am trying to upload a file to images directory, but when I press the submit, it not upload, What am doing wrong with php? 
this is my uplod.php
<?php
if(!isset($_POST["go"]))
{
    echo "Sorry ,could not upload!";
}
else
{    
    $f=$_FILES["uf"]["name"];     
    $path="images/";
    $file=$path.$f;
    move_uploaded_file($_FILES["uf"]["name"],$file);

Thank you for your help

A:

Change this
 move_uploaded_file($_FILES["uf"]["name"],$file);

to 
 move_uploaded_file($_FILES["uf"]["tmp_name"],$file);

move_uploaded_file() function doesn't  move the file directly from  form to the new loc, after submitting the form, file is first saved on the temp_directory with tmp_name, and then move_uploaded_file() function moves it to the new location.

