Upload image or file

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mrijet
    New Member
    • Feb 2015
    • 64

    Upload image or file

    Below is the code upload image...but I couldn't see the error..

    Code:
    <?php
    if (isset($_POST['btn_uplaodpic']))
    {
    	$id = $_POST['hf_uname'];
    	move_uploaded_file($_FILES['file']['tmp_name'],"images/".$id.".jpg");
    	echo "Successfully upload!";
    }
    ?>
    Is that the correct code for upload image?
Working...