Problem with MySQL input

Home Forums Quform WordPress Problem with MySQL input

This topic is: not resolved
Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #17757
    mobilemadman
    Participant

    Hi,

    I have problem with custom input into my MySQL database,

    I have very large form so table in DB is also large, all fields are correct as I copy and pasted every field from form I created. So no problem there.

    My settings look like:

    Save submitted form data (CHECKED)
    Use WordPress database (NOT CHECKED)

    All login info to custom DB are ok

    now, I checked and added error_log function to file

    // Okay, so now we can save form data to the custom database table if configured
    if (count($fields = $form->getDbFields())) {
    foreach ($fields as $key => $value) {
    $fields[$key] = $form->replacePlaceholderValues($value);
    }

    if ($form->getUseWpDb()) {
    global $wpdb;
    $wpdb->insert($form->getDbTable(), $fields);
    } else {
    $cwpdb = new wpdb($form->getDbUsername(), $form->getDbPassword(), $form->getDbName(), $form->getDbHost());

    error_log('iform 900@ common.php: ' . "\n\r". print_r($cwpdb));

    $cwpdb->insert($form->getDbTable(), $fields);

    error_log('fields: ' . "\n\r". print_r($fields));
    }
    }

    and the error log shows

    [30-Dec-2015 16:29:11 UTC] iform 900@ common.php: 
    
    1
    [30-Dec-2015 16:29:11 UTC] fields: 
    
    1
    

    no entry to my DB,

    is that because I am not filling out some data fields in form while testing? I get the email but the data does not go into MySQL table…

    Please advise.

    #17758
    mobilemadman
    Participant

    sorry, forgot about 1 in error_log
    error_log(‘fields: ‘ . “\n\r”. print_r($fields,1));

    it tells me there is bad DB connection
    Error establishing a database connection

    you may include some kind of logs in next version of your awesome tool :-)))

    thanks and have happy New Year!!

    #17793
    Ally
    Support Staff

    You don't have permission to view this content. Please log in or register and then verify your purchases to gain access.

Viewing 3 posts - 1 through 3 (of 3 total)
  • You must be logged in to reply to this topic.
Be inspired. © 2024 ThemeCatcher Ltd. 20-22 Wenlock Road, London, England, N1 7GU | Company No. 08120384 | Built with React | Privacy Policy