How can this be used in a PHP form?

Last post 07-13-2012, 10:28 AM by peterbe. 3 replies.
Sort Posts: Previous Next
  •  07-12-2012, 2:37 PM 74121

    How can this be used in a PHP form?

    There are no implementation examples for use in a form. For example, how do I make a VAR out of the downloaded filenames to insert into a database?
  •  07-13-2012, 7:10 AM 74122 in reply to 74121

    Re: How can this be used in a PHP form?

    Hi peterbe,
     
    Please refer to http://phpfileuploader.com/Deployment.html. It shows you how to deploy and use the php uploader in your form.
     
    Step 3 shows you how to get the upload file name, you can write your database code there to save the name into database.
     
    Regards,
     
    Ken 
  •  07-13-2012, 10:20 AM 74124 in reply to 74122

    Re: How can this be used in a PHP form?

    Thanks, Ken. The uploader is not creating the element, $_POST["myuploader"].

    It is, however, creating these elements in the $_POST array:
     
    $_POST["UploadLib_Uploader_js"]
     
    and
     
    $_POST["AjaxUploaderFiles "] 
     
    Neither of those vars contain a filename. Nor do the other uploader vars in the example. (When echoed, they are empty).

    The selected file is moved and saved OK but I am not able to figure out how to write the filename to a var for databasing.

  •  07-13-2012, 10:28 AM 74125 in reply to 74124

    Re: How can this be used in a PHP form?

    Ooooops. My error. Please disregard all of the above. I initialized "myuploader" as "myUploader". After fixing that discrepancy, everything works fine. Many thanks for your response.
View as RSS news feed in XML