How to retrieve uploaded files using php

前端 未结 4 1699
无人共我
无人共我 2021-01-16 04:49

Ok. I have searching on this site Since August 24 2011.(not that it matters) for a way to display files that have been uploaded by a user. I have my form on the admin side a

4条回答
  •  难免孤独
    2021-01-16 05:30

    Something very basic that you might have missed is the form enctype. Many begginers does this. So just check if you have the enctype attribute in the form.

    Only if you have this you can upload files through your forms. Another place where you could possibly gone wrong is

    $query = "INSERT INTO user_DB VALUES ('','$company', '$location', '$userfile' )";
    

    You store the file name in a variable called $pic but here you have given $userfile so just try changing that into $pic.

提交回复
热议问题