<div dir="ltr">This may be a good idea for a better editor. with this setup you will get syntax highlighting and will show errors too. <div><br></div><div><a href="https://blog.theodo.com/2019/07/vscode-php-development/">https://blog.theodo.com/2019/07/vscode-php-development/</a> </div><div> <br clear="all"><div><div dir="ltr" class="gmail_signature" data-smartmail="gmail_signature"><div>--</div><a href="http://gplus.to/azmodie" target="_blank">http://gplus.to/azmodie</a><div>"Since light travels faster than sound, people appear bright until you hear them speak."  -- some bright spark</div></div></div><br></div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 14 May 2020 at 13:08, Colin Shorts <<a href="mailto:colin.shorts@gmail.com">colin.shorts@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="auto">I think you've also missed an echo on <span style="font-family:sans-serif;font-size:12.8px">"Fourth if";</span></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Thu, 14 May 2020, 10:37 Andrew Robinson, <<a href="mailto:andrew@robinson-a.co.uk" target="_blank">andrew@robinson-a.co.uk</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">A quick scan, your <br> on line 19 is html, I believe you'll need to put that in quotes - "<br>".<br>
<br>
You're missing a semicolon on line 32 - echo "Sorry, there was an error uploading your file.";<br>
<br>
----<br>
Again, try using debugging errors or a sandbox as previously linked to, it'll should about these errors. <br>
<br>
Cheers, <br>
<br>
<br>
> On 14 May 2020 at 09:55 Andrew Ramage <<a href="mailto:andrew.ramage.1963@gmail.com" rel="noreferrer" target="_blank">andrew.ramage.1963@gmail.com</a>> wrote:<br>
> <br>
> <br>
> I still do not see a syntax error in this file:<br>
> <br>
> _upload.html_<br>
> <br>
> <!doctype html><br>
> <br>
> <html><br>
> <br>
> <br>
> <?php<br>
>     error_reporting(E_ALL);<br>
> <br>
> <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>
> echo "Second if";<br>
> // Allow certain file formats<br>
> if (($audioFileType != "mp3") && ($audioFileType != "ogg"))  {<br>
>      echo $audioFileType . <br>
 . "Sorry, only MP3 and OGG files are <br>
> allowed.";<br>
>      $uploadOk = 0;<br>
> }<br>
> // Check if $uploadOk is set to 0 by an error<br>
> echo "Third if";<br>
> if ($uploadOk == 0) {<br>
>      echo "Sorry, your file was not uploaded.";}<br>
> // if everything is ok, try to upload file<br>
>   else {<br>
>      "Fourth if";<br>
>      if (move_uploaded_file($_FILES ["fileToUpload"]["tmp_name"], <br>
> $target_file)) {<br>
>          echo "The file ". basename( <br>
> $_FILES["filndow.alerteToUpload"]["name"]). " has been uploaded."; }<br>
>      else {<br>
>          echo "Sorry, there was an error uploading your file."<br>
>           }<br>
>      }<br>
> ?><br>
> <br>
> </html><br>
> <br>
> -- <br>
> EdLUG mailing list<br>
> <a href="mailto:EdLUG@lists.edlug.org.uk" rel="noreferrer" target="_blank">EdLUG@lists.edlug.org.uk</a><br>
> <a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a><br>
<br>
-- <br>
EdLUG mailing list<br>
<a href="mailto:EdLUG@lists.edlug.org.uk" rel="noreferrer" target="_blank">EdLUG@lists.edlug.org.uk</a><br>
<a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a></blockquote></div>
-- <br>
EdLUG mailing list<br>
<a href="mailto:EdLUG@lists.edlug.org.uk" target="_blank">EdLUG@lists.edlug.org.uk</a><br>
<a href="https://lists.edlug.org.uk/mailman/listinfo/edlug" rel="noreferrer" target="_blank">https://lists.edlug.org.uk/mailman/listinfo/edlug</a></blockquote></div>