Submit Multiple Form Entries To A MySQL Table

Închis Postat la acum 6 ani S-au achitat serviciile după ce au fost prestate
Închis S-au achitat serviciile după ce au fost prestate

I have a form that allows to add more than one entry, the following code inserts the first entry into the database correctly, however if the user wants to add more than one entry in a single form submission the following code will not insert all the form fields entries into the table. I was wondering if there is a foreach statement that is required to do this.

add_action('frm_after_create_entry', 'wp_frm_tasks', 20, 2);

function wp_frm_tasks($entry_id, $form_id){

if($form_id == 14){ //change 4 to the form id of the form to copy

global $wpdb;

$values = array(

'user_id' => $_POST['item_meta'][1140],

'user_id_fe' => $_POST['item_meta'][230],

'profile_start_date_fe' => $_POST['item_meta'][1139],

'display_name_fe' => $_POST['item_meta'][1196],

'email_fe' => $_POST['item_meta'][1197],

'establishment_fe' => $_POST['item_meta'][473],

'rank_fe' => $_POST['item_meta'][474],

'task_name_fe' => $_POST['item_meta'][233],

'flexibility_fe' => $_POST['item_meta'][248],

'task_type_fe' => $_POST['item_meta'][247],

'entry_count_fe' => $_POST['item_meta'][1195],);

//replace 25 and 26 with the field ids of the Formidable form. Change col_name to the column names in your table

$wpdb->insert('wp_frm_tasks', $values);

//change table_name to your table name

}

}

PHP SQL

ID Proiect: #15134090

Detalii despre proiect

19 propuneri Proiect la distanță Activ acum 6 ani

19 freelanceri plasează o ofertă medie de 18£ pentru proiect

liangjongai

Hi! I'm interesting your project very well. i mastering PHP and SQL. And also I have many experience and good skill about web and android development. Let's go ahead with me Stay tuned, I'm still working on this pro Mai multe

£20 GBP în 1 zi
(271 recenzii)
7.9
lurdsubas

Hello sir, I am a developer with expertise on SQL statements. From your description you appear to be using a dynamic form, so would require a dynamic sql. I will be available to work with you on this. Relevant Skills Mai multe

£30 GBP în 1 zi
(42 recenzii)
7.3
cmitexperts

Hi there! Did go through your Job Description and glad to share that I have experience in working with wordpress platform. Relevant Skills and Experience I also have expertise with Magento,WordPress, PHP, PHP Scripti Mai multe

£18 GBP în 1 zi
(297 recenzii)
7.5
srinichal

ready to discuss further details Relevant Skills and Experience proven expertise Proposed Milestones £23 GBP - milestone

£23 GBP în 1 zi
(130 recenzii)
7.4
technoweb7

A proposal has not yet been provided

£18 GBP în 1 zi
(25 recenzii)
6.4
asadrana91

Hi, I have experience with such tasks. Can fix the problem for you. Relevant Skills and Experience SQL Web development Query PHP Proposed Milestones £29 GBP - Code

£29 GBP în 1 zi
(58 recenzii)
6.4
luminous15

A proposal has not yet been provided

£15 GBP în 1 zi
(54 recenzii)
6.1
mail2vimalarora

Hi..I have gone through your project description and the given code and can help you out in modifying the code for insertion of multiple entries as you require. Relevant Skills and Experience Technically well versed i Mai multe

£20 GBP în 1 zi
(89 recenzii)
5.7
nitin247

Hi, I am very much interested in handling the from processing . I am an experienced Wordpress developer

£13 GBP în 2 zile
(29 recenzii)
5.1
simrankaurc

Why you should hire me? Professional project management & experts in managing projects remotely Security coding standard Ability to work in your time zone 24/7/365 availability Relevant Skills and Exper Mai multe

£10 GBP în 1 zi
(20 recenzii)
4.4
rakesh4devop

Hi, I went through the code you mentioned in requirements . i would like to do this task. . Please PM for more details. Thanks, Rakesh Sharma Relevant Skills and Experience php Proposed Milestones £18 GBP - m1

£18 GBP în 1 zi
(3 recenzii)
3.6
nbeslie

Hi, I am interested to work in your project. Please contact me for the details. Relevant Skills and Experience -5 years of experience in (full-stack)web-development -Bachelor degree in computer science and engineering Mai multe

£13 GBP în 1 zi
(9 recenzii)
3.1
AMDigitalS

A proposal has not yet been provided

£20 GBP în 6 zile
(6 recenzii)
2.1
rajeshdevup

Hello Sir, How are you doing? I went through your requirement and Yes I can do. I will be available to discuss in detail. Thank you Rajesh Kumar

£23 GBP în 1 zi
(2 recenzii)
1.8
ravisankar1982

i have good experience in PHP. i need to increase my reviews. The amount is negotiable. Relevant Skills and Experience i have good experience in PHP. i need to increase my reviews. The amount is negotiable. Proposed Mai multe

£18 GBP în 1 zi
(0 recenzii)
0.0