I tried changing the file uploading to a standalone set of files. Here is what it now looks like:
File select form:
<?php
session_start();
echo '<p style="text-align:center">This script will update the <b>LOGO</b> for the website <b>' . $_SESSION['band'] . '</b></p>';
echo '<form enctype="multipart/form-data" action="logoup.php" method="POST">
<input type="hidden" name="MAX_FILE_SIZE" value="100000">
Choose a file to upload: <input name="uploadedfile" type="file"><br />
<input type="submit" value="Upload File">
</form>';
?>
Here is the file uploader script:
<?php
// Where the file is going to be placed
$target_path = "images/";
echo $_files['uploadedfile'];
/* Add the original filename to our target path.
Result is "uploads/filename.extension" */
$target_path = $target_path . basename( $_FILES['uploadedfile']['name']);
if(move_uploaded_file($_FILES['uploadedfile']['tmp_name'], $target_path)) {
echo "The file ". basename( $_FILES['uploadedfile']['name']).
" has been uploaded";
} else {
echo "There was an error uploading the file, please try again!";
}
if(isset($_FILES["logo"]) && file_exists($_FILES["uploadedfile"]["tmp_name"]))
echo "Temp file exists!";
?>
Not sure if I put the temp upload checker in the right location..
Here is the results of anything I try to upload:
There was an error uploading the file, please try again!
No matter what I do. The subdirectory 'images' is in the current folder, and it has write to permissions for the user, the permissions are: 0755
I have tried ever kind of permission I can think of. So what could be the problem?
Ice