<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body>
<p>When I select files, the upload starts, but I do not reach the
first echo statement. Can anyone tell me why ?</p>
<p><u>HTML</u></p>
<p><form action="upload.php" method="post"
enctype="multipart/form-data"><br>
<input type="file" name="fileToUpload" id="fileToUpload"
multiple><br>
<input type="submit" value="Upload music file"
name="submit"><br>
</form><br>
</p>
<p><u>upload.php</u></p>
<p><html><br>
<body><br>
<br>
<br>
<?php<br>
$target_dir = "Music/";<br>
$target_file = $target_dir .
basename($_FILES["fileToUpload"]["name"]);<br>
$uploadOk = 1;<br>
$audioFileType =
strtolower(pathinfo($target_file,PATHINFO_EXTENSION));<br>
<br>
// Check if file already exists<br>
echo "First if";<br>
if (file_exists($target_file)) {<br>
echo "Sorry, file already exists.";<br>
$uploadOk = 0;<br>
} <br>
<u></u></p>
<p><u><br>
</u></p>
<p><br>
</p>
</body>
</html>