I have a form that allows the site's owners to upload image files and associate them with entries in the database. I have the database side of things working: the file path is stripped down and added to the database so that it can be used to refernece the file in the output page. Now I'm stuck on the bit where I actually upload the files.
I have the following form:
Code: Select all
<form action="act_editCategory.php" method="post" name="editCategoryForm" id="editCategoryForm">
<input type="hidden" name="ID" value="<?php print $rowї"ID"]; ?>" />
<label for="CategoryName">Category Name:</label>
<input name="CategoryName" type="text" id="CategoryName" value="<?php print $rowї"CategoryName"]; ?>" />
<label for="Image">Title Image:</label>
<input name="Image" type="file" id="Image" />
<label for="Image1">Image 1:</label>
<input name="Image1" type="file" id="Image1" />
<label for="Image2">Image 2:</label>
<input name="Image2" type="file" id="Image2" />
<input type="submit" value="Edit Category" />
</form>Code: Select all
$path1 = "/var/www/html/_images/db_titles/" . $_FILESї'Image']ї'name'];
if (is_uploaded_file($_FILESї'Image']ї'name'])) {
move_uploaded_file($_FILESї'Image']ї'tmp_name'], $path1);
}Can someone please tell me what I'm doing wrong? I've tried numerous upload scripts from different sources, and can't get any of them to work.
Cheers,
Seona.