The move_uploaded_file()
needs 2 arguments.
The temporary file destination (which is defined in PHP.ini as the temporary directory for uploads) and the final destination, indicated by you.
Note that this board already has to exist. If it does not already exist (and with the right permissions) you have to create it. You can create the board as @Diego suggested .
$temp = $_FILES["new_image"]["tmp_name"];
$error = $_FILES["new_image"]["error"];
if ($error > 0) die("Algo correu mal!... code $error.");
move_uploaded_file($temp, $finalPath); // $finalPath defenida por tí
Keep in mind that uploading uploaded files within public_html
is not safe. At least check if the file is an image like this:
$temp = $_FILES["new_image"]["tmp_name"];
$error = $_FILES["new_image"]["error"];
$name = $_FILES["new_image"]["name"];
$uploadPath = "/home/storage/b/71/d0/site1390582818/upload/".$name;
$finalPath = "/home/storage/b/71/d0/site1390582818/public_html/upload/".$name;
if ($error > 0) die("Algo correu mal!... code $error.");
move_uploaded_file($temp, $uploadPath);
$size = getimagesize($uploadPath);
if(!$size) die('Algo correu mal!...');
rename($uploadPath, $finalPath);