there is a little form on one page which has the code below,
<div class="postcomment">
<form id="comments" action="insertcomment.php" method="POST" enctype="multipart/form-data">
Comment: <input type="text" name="comment" id="commentfield">
<input type="submit" name="submit" value="Post comment" class="button">
<br>
<input type="hidden" name="MAX_FILE_SIZE" value="1048576" />
Image: <input type="file" name="image" />
<br>
</div>
once the user adds the picture by browsing for it the form then goes to the insertcomment.php code which is below
$target_path = "images/";
$file_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $file_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']). " has been uploaded";
} else{
echo "There was an error uploading the file, please try again!";
}
and for some reason it is displaying the error and not showing in the images directory, the error is: Parse error: syntax error, unexpected T_IF in /homepages/21/d417005970/htdocs/rk8479/htdocs/insertcomment.php on line 18
;or unclosed}, but it isn't in the code you posted. What is line 18 (and the surrounding lines) ofinsertcomment.php?T_IF.