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

    Concatenate 2 strings in PHP in POST Data method

    Asked by jamesforpm on September 26, 2014 at 07:15 PM

    If I have two fields that I want to merge, would the code be:

    $phonenumber = $_POST['field1'] ."-". $_POST['field2'];

    Then in my db this would appear in one column as 'field1' - 'field2'

    This is a re-post of a comment on How to send Submissions to Your MySQL Database Using PHP

  • Profile Image
    JotForm Support

    Answered by jonathan on September 26, 2014 at 07:38 PM


    Yes, that is correct. The concatenation operator for PHP is  ('.') 

    I suggest you also check the PHP manual for proper syntax construction.

    Please inform us if you need further assistance.