I am trying to copy an image and save it in the directory Uploads.
But something is wrong.
$image = $_POST['image_file'];
if(!empty($image))
{
$target_path = "Uploads/";
$target_path = copy($_FILES['image_file']['name'],$target_path);
}
<FORM action="" method="post">
<input id="image_file" type="file" name="image_file" title="Upload">
</form>
I don't want to use another page in action.
And I want to save it with name 'Image'.
Could someone help me ?
Thanks a lot