Can't send array to MySQL

Home Forums Quform PHP Can't send array to MySQL

This topic is: not resolved
  • This topic has 11 replies, 2 voices, and was last updated 7 years ago by Ally.
Viewing 12 posts - 1 through 12 (of 12 total)
  • Author
    Posts
  • #20962
    scifiguru
    Participant

    Having an issue where form will not send to MySQL. I am using the default process.php.
    Error is as follows:

    [19-Mar-2017 16:57:48 UTC] PHP Warning: mysqli::real_escape_string() expects parameter 1 to be string, array given in /home/aaaaaa/public_html/quform/process.php on line 664

    line 664 in process.php contains the following:
    $values = array_map(array($db, ‘real_escape_string’), array_values($data));

    Help? 🙁

    #20977
    scifiguru
    Participant

    Any assistance? I still can’t send form contents to MySQL with this error and no reply on this problem in over 4 days now. Thanks.

    #20987
    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.

    #20996
    scifiguru
    Participant

    This form has no elements into it that are an array, hence my confusion over this… I have no array types. If what you say is the case then why isn’t process.php set up like this initially? Even when I use an unedited process.php I am getting this same error.

    Are you saying that instead of this

     $data = array(
    'city' => $form->getValue('city')
    );
    

    it would be

    $data = array(
    join(', ', $form->getValue('city'))
    );
    


    ?

    #21010
    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.

    #21031
    scifiguru
    Participant

    Thanks for this – I didn’t see anything with brackets like that but hopefully this is something rather simple I’m just not seeing. I sent the form and process to that email as well as the error message I receive on process.php. Appreciate you taking a look.

    #21049
    scifiguru
    Participant

    Hi there, wondering if there is any possibility for this to be resolved. I haven’t seen a response to my email I sent on 3/31. Quform doesn’t appear to send data to MySQL as it is currently. Thanks.

    #21057
    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.

    #21063
    scifiguru
    Participant

    It still doesn’t work.

    [30-Mar-2017 20:06:54 UTC] PHP Warning: mysqli::real_escape_string() expects parameter 1 to be string, array given in /home/xxxxx/public_html/xxxxx/quform/process.php on line 629

    That line is the same as before.
    $values = array_map(array($db, 'real_escape_string'), array_values($data));

    So it’s something else.

    #21064
    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.

    #21065
    scifiguru
    Participant

    I definitely edited the correct process.php. There’s only one on the server.
    When I turn off its ability to dump the info to MySQL, it works. The problem is I absolutely need to dump this to MySQL.

    Still get the same error even when I change all of the

    $form->getValue
    in the $data array to
    $form->getValuePlain

    Same error spits out as before and doesn’t send to MySQL, nor email me form contents. There’s an error.

    #21070
    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 12 posts - 1 through 12 (of 12 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