Home › Forums › Quform PHP › Can't send array to MySQL
- This topic has 11 replies, 2 voices, and was last updated 7 years, 7 months ago by Ally.
- AuthorPosts
- March 19, 2017 at 5:00 pm #20962scifiguruParticipant
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? 🙁
March 23, 2017 at 9:43 pm #20977scifiguruParticipantAny 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.
March 24, 2017 at 10:36 pm #20987AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 27, 2017 at 2:02 pm #20996scifiguruParticipantThis 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')) );
?March 29, 2017 at 7:24 pm #21010AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
March 31, 2017 at 2:08 pm #21031scifiguruParticipantThanks 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.
April 5, 2017 at 3:53 pm #21049scifiguruParticipantHi 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.
April 6, 2017 at 11:00 am #21057AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 6, 2017 at 2:10 pm #21063scifiguruParticipantIt 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.
April 6, 2017 at 2:27 pm #21064AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
April 6, 2017 at 2:39 pm #21065scifiguruParticipantI 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.
April 6, 2017 at 3:58 pm #21070AllySupport StaffYou don't have permission to view this content. Please log in or register and then verify your purchases to gain access.
- AuthorPosts
- You must be logged in to reply to this topic.