Hi,
how can I save the IP address into DB table when user submit form with Chronoforms V5?
Thanks in advice.
how can I save the IP address into DB table when user submit form with Chronoforms V5?
Thanks in advice.
<?php
$form->data['ip_address'] = $_SERVER['REMOTE_ADDR'];
?>
Array
(
[chronoform] => contact
[event] => submit
[message] => TEST 5
[prenom] => John
[nom] => Doe
[telephone] =>
[email] => john.doe@company.com
[adresse] =>
[code-postal] => 5000
[localite] => Namur
[button10] => Submit
[contact] =>
[ip_address] => 91.183.9.72
)
ipaddress varchar(255) utf8_general_ci
<input id="ipaddress" class="form-control A" type="hidden" value="10.5.0.8" name="ipaddress">
Array
(
[option] => com_chronoforms5
[chronoform] => NewStudentInquiryForm
[event] => submit
[new_student_name] => Adam
[new_student_email] => Test@test.com
[new_student_occupation] => I am a tester
[new_student_personalinfo] =>
[new_student_over18] => Yes
[new_student_age_under18] =>
[new_student_best_contact] => Email
[new_student_how_find] =>
[new_student_contact_reason] =>
[new_student_prior_exp_rdo] => No
[new_student_prior_exp_val] =>
[new_student_more_info] =>
[ipaddress] => 10.5.0.8
[button21] => Submit
[id] => 6
)
Array
(
[26] => Array
(
[DB Save] => Array
(
[Queries] => Array
(
[0] => INSERT INTO `ptko3_chronoforms_data_NewStudentInquiryForm` (`new_student_name`, `new_student_email`, `new_student_occupation`, `new_student_personalinfo`, `new_student_over18`, `new_student_age_under18`, `new_student_best_contact`, `new_student_how_find`, `new_student_contact_reason`, `new_student_prior_exp_rdo`, `new_student_prior_exp_val`, `new_student_more_info`, `user_id`, `created`) values ('Adam', 'Test@test.com', 'I am a tester', '', 'Yes', '', 'Email', '', '', 'No', '', '', '0', '2014-07-16 21:36:09');
)
)
)
)