As i see from your code, you're likely "sending" (copy()
) the uploaded file to a folder. You don't need that.
Also you need a form like:
Code: Select all
<form method="post" enctype="multipart/form-data">
Image file: <input type="file" name="userfile" size="40">
<input type="submit" value="submit">
See the enctype="multipart/form-data"
? Try the code i showed you.
After uploading the file, the information about the files' size, which you'll store in you MySQL table will be in $_FILES['userfile']['size'];