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

    Inserting checkbox answers into a database column

    Asked by eridamega on June 18, 2017 at 04:02 PM

    Please help me with this code, yo insert array https://www.jotform.com/answers/1176672-How-do-I-insert-multiple-checkbox-values-into-a-table



    This is a re-post of a comment on How to Post Submission Data to Thank You Page

  • Profile Image
    JotForm Support

    Answered by Mike on June 18, 2017 at 04:42 PM

    You may try an implode() function to join array elements into a string. Please check answer from Charmiequino in the next thread.

    What is the appropriate way to handle checkboxes in mySQL?

    Thank you.

  • Profile Image

    Answered by eridamega on June 18, 2017 at 09:48 PM
    [seleccionael25] => Array ( [0] => Oximetros de pulso [1] => Linterna (Penlights) [2] => Repuestos Littmann [3] => Doppler fetal [4] => Martillo de refeljos [5] => Cubre-Fonendos [6] => Tensiometros [7] => Equipo de organos [8] => Otros accesorios [9] => Batas Greys Anatomy )

    I used this code and it does not work

     

    $checkbox = array("seleccionael25" => $_POST[seleccionael25]); // Nuevo codigo de jotform

    $articulo  = implode(',', $checkbox['seleccionael25']);

    Obtained from here https://www.jotform.com/answers/436393

     

    What am I doing wrong?

     

  • Profile Image
    JotForm Support

    Answered by Chriistian on June 18, 2017 at 11:19 PM

    Since the checkbox is in array, you don't need to use the array() function. Please remove this code below:

    $checkbox = array("seleccionael25" => $_POST[seleccionael25]); // Nuevo codigo de jotform

    $articulo  = implode(',', $checkbox['seleccionael25']);

     

     

    Please try the following code instead:

    $articulo  = implode(',', $_POST[seleccionael25]);

     

    Regards.