I’m trying to make a simple file-uploading thing to upload logos for each account into our database and I’m new to file uploading. It’s not finding a file at all. Here’s what I’ve got:
[CODE]move_uploaded_file($_FILES[“builderLogo”][“tmp_name”],
“../gallery/builders/” . $_FILES[“builderLogo”][“name”]);
if ($_FILES[“builderLogo”][“error”] > 0) {
echo “<p>Error: ” . $_FILES[“builderLogo”][“error”] . “</p>”;
}
else{
echo “<p>Upload: ” . $_FILES[“builderLogo”][“name”] . “<br />”;
echo “Type: ” . $_FILES[“builderLogo”][“type”] . “<br />”;
echo “Size: ” . ($_FILES[“builderLogo”][“size”] / 1024) . ” Kb<br />”;
echo “Stored in: ” . $_FILES[“builderLogo”][“tmp_name”] . “</p>”;
}
And later:
[CODE]Name: <input type=”text” name=”builderName”>
<br/>Logo: <input type=”file” name=”builderLogo”>
<br/>Desc: <input type=”text” name=”builderDesc”>
It will make a new account and add it to the database, but the image uploading isn’t working at all. Any help/advice would be greatly appreciated.