iam trying to upload a file using the following code :
<html>
<body>
<form action="upload.php" method="post"
enctype="multipart/form-data">
<label for="file">Filename:</label>
<input type="file" name="file" id="file" />
<br />
<input type="submit" name="submit" value="Submit" />
</form></body>
</html>
<?
move_uploaded_file($FILES["file"]["tmp_name"],
"/home/petromar/public_html/uploads/" . $FILES["file"]["name"]);
?>
all i get after submitting is that :
Warning: move_uploaded_file(/home/petromar/public_html/uploads/Water lilies.jpg) [function.move-uploaded-file]: failed to open stream: Permission denied in /home/petromar/public_html/lagina/upload.php on line 13
Warning: move_uploaded_file() [function.move-uploaded-file]: Unable to move '/tmp/phpe0I3oU' to '/home/petromar/public_html/uploads/Water lilies.jpg' in /home/petromar/public_html/lagina/upload.php on line 13
Stored in: upload/Water lilies.jpg
can any body help please ASAP thnx