I am doing a site, and I made a form in html, than made an upload function for avatars which after that I want the file to be shown in a preview in the browser near the upload form. I did the function in php on another file and linked it to the respective upload form, problem is the server is getting me an error on line 7 which is actually the $goto1 variable, any ideea why is this happening? Here is the code to both, html upload form and php function: HTML Code: <form action="avatar_upload.php" method="post"> <!--Avatar upload form--> Upload avatar:<input type="file" name="avatar_upload" /> <input type="submit" value="Upload avatar" name="avatarUploadaSubmit"><br/> <div class="font-style-desc"> Avatar upload image. Please pick a avatar upload image. Image<br/> type must be JPEG or PNG only, must not be larger than 500KB <br/> and has to be no larger than 136 in width and 164 in height. </div class="font-style-desc"> <form name="avatarImage" action="avatar_upload.php"> <!--Synched avatar image--> <input type="image" action="avatar_upload.php"> </form> HTML: PHP code: <?php function moveToDir(){ //function to move uploaded images to chosen folder in $destination variable and to upload the file itself $uploadedFile=$_FILES["avatar_upload"]; $destination='/images/avatars'; $avatarUploadSubmit=$_["avatarUploadaSubmit"]; $goto1=bool move_uploaded_file(string $uploadedFile, string $destination); if($avatarUploadSubmit==true){ echo $goto1; } } else function moveToDir( > 0){ echo "Error, could not upload file: " .$uploadedFile["error"]. "<br/>"} else{ echo "Uploaded: ".$uploadedFile["name"]; } ?> PHP: