I want the users to upload files through my webapp I am developing in PHP usinig MySql in the backend. I want to store the files in the database. I am facing problems in doing so. Also, once the file is stored in a Database how do we go for downloading it, displaying it correctly in the webapp (the file type, and other attributes of the file).
Ben benzer bir form kullanabilirsiniz:
<FORM METHOD="post" ACTION="fileUpload.php" ENCTYPE="multipart/form-data">
<INPUT TYPE="hidden" NAME="MAX_FILE_SIZE" VALUE="3000000">
<INPUT TYPE="hidden" NAME="action" VALUE="upload">
<TABLE BORDER="1">
<TR>
<TD>Description: </TD>
<TD><TEXTAREA NAME="txtDescription" ROWS="10" COLS="50"> </TEXTAREA></TD>
</TR>
<TR>
<TD>File: </TD>
<TD><INPUT TYPE="file" NAME="binFile"></TD>
</TR>
<TR>
<TD COLSPAN="2"><INPUT TYPE="submit" NAME="Upload" VALUE="Upload"></TD>
</TR>
</TABLE>
</FORM>
but when i submit it and i print out the $_POST array i get : Array ( [MAX_FILE_SIZE] => 3000000 [action] => upload [txtDescription] => jassfhjabsf [Upload] => Upload )
I am unable to understand where the file content "binFile" is getting lost. Can anybody please help me?
Regards, Mayank.