_remote_ip & wpcf7_before_send_mail
-
I’m using the following code and everything works well except that values of following variables are not getting saved. I’m sure I’m not using them correctly.
_remote_ip
_urladd_action('wpcf7_before_send_mail', 'save_cf7_db_san'); function save_cf7_db_san($wpcf7) { global $wpdb; $title = $wpcf7->title(); if(isset($_POST['your-name'])) $name = $_POST['your-name']; if(isset($_POST['your-email'])) $email = $_POST['your-email']; if(isset($_POST['your-phone'])) $phone = $_POST['your-phone']; if(isset($_POST['your-message'])) $msg = $_POST['your-message']; if(isset($_POST['_remote_ip'])) $ip = $_POST['_remote_ip']; if(isset($_POST['_url'])) $page = $_POST['_url']; $wpdb->insert( 'myforms', array( 'dt' => date('Y-m-d'), 'tm' => date('H:i:s'), 'ip' => $ip, 'title' => $title, 'page' => $page, 'name' => $name, 'email' => $email, 'phone' => $phone, 'msg' => $msg ) ); }
Can someone help me with the correct syntax.
Thanks
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘_remote_ip & wpcf7_before_send_mail’ is closed to new replies.