0

i need help, i'm programing some kind of catalogue and i have a page where clients can upload their logo or images. every page i make is included in index.php and my url looks like something like this www.url.com/index.php?s=upload where "upload" is name of upload.php file.

when i create form on that upload.php file and submit it, $_FILES array is empty.

echo "<form method=\"post\" enctype=\"multipart/form-data\" action=\"index.php\" />\n";
echo "<input type=\"file\" name=\"image\">\n";
echo "<input type=\"hidden\" name=\"s\" value=\"upload\">\n";
echo "<input type=\"submit\" name=\"submit\" value=\"Spremi\">\n";
echo "</form>\n";

i tried everything and nothing works. $_POST items are returned but $_FILES are empty...

4
  • Does anyone else see the floating not tag in text? Commented Apr 26, 2010 at 13:03
  • Probably because tagged with "-files" Commented Apr 26, 2010 at 13:06
  • Oops, I accidentally broke it :-( Commented Apr 26, 2010 at 13:06
  • !!!!!! Pavel :( (15 characters) Commented Apr 26, 2010 at 13:24

1 Answer 1

2

make sure you have uploads enabled in your php.ini file:

file_uploads = On
Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.