What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.

  • Profile Image

    store file upload on my server using php

    Asked by milbra on February 20, 2014 at 11:57 PM

    I have a form collecting general user information and uploading a file. I have a php program to insert the general information into our mysql database. How do I insert the file into my database? I can only insert the file's title. 


    Also, I saw post  about using FTP regarding files and clicked that option which made my form secure.  How do I remove the security?


    Thank you for your help.

    Page URL:

  • Profile Image
    JotForm Support

    Answered by EltonCris on February 21, 2014 at 01:48 AM


    The POST DATA does not pass the actual file, it only provides the file name and then construct your PHP script to create the file URL. The FTP upload will be of help as well.



    $submissionid = $_POST['submission_id'];

    $filename= $_POST['uploadFormatted'];

    echo 'http://www.yoursite.com/files/'.$filename;



    Just replace https://secure with http://form on the form URL if you do not want to use the secure version of the form.

    Let us know should you have further questions.


  • Profile Image
    JotForm Support

    Answered by NeilVicente on February 21, 2014 at 03:10 AM


    As far as I know, databases can only store string-based data, such as an uploaded file's URL, not the actual file itself.

    In addition to my colleague's solution, you may add your PHP script as a Webhook instead of as a Thank You URL in order to capture the (JotForm-hosted) uploaded file's URL.

    If you want to have download the file to your server, you may use PHP's ftp_get function.