We launched new forums in March 2019—join us there. In a hurry for help with your website? Get Help Now!
    • 4775
    • 47 Posts
    I have a form with a hidden field. The hidden field looks like this:

    <input type="hidden" value="1215038640" name="timestamp"/>


    I’m using eForm for the form. It than posts to a snippet called eform2db (which is awesome btw). It is supposed to insert the timestamp to the database like this:

    $dbTable[timestamp] = $fields['timestamp'];


    $dbQuery = $modx->db->insert( $dbTable, $table_prefix . 'mysql_table_name' );


    So, the snippet grabs the value of the hidden field and should insert it into the correct column in the database. It is doing that just fine except one thing, it has commas! The timestamp looks like this in MySQL:
    1,215,038, when it should look like this: 1215038640.

    What am I doing wrong? The number doesnt have commas to start with so why would it put them in automatically?

    Any assistance is greatly appreciated!

    Best regards,

    Chris
      • 4775
      • 47 Posts
      I’m all set, I figured it out. Close thread.
        • 28042 ☆ A M B ☆
        • 24,524 Posts
        It would be very nice if you mentioned what you did to fix the problem in case others run into the same thing.
          Studying MODX in the desert - http://sottwell.com
          Tips and Tricks from the MODX Forums and Slack Channels - http://modxcookbook.com
          Join the Slack Community - http://modx.org