FORUMS


The Form Tools forums are no longer active, but the old posts have been archived here. Please see the Help page on how to get help / report issues.

Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Proper syntax for ft_api_check_submission_is_unique IP Address check
#1
I am trying to make sure that form submissions are unique with both email and IP address verification. I currently have the verification for the email address working, but I am wondering what the proper syntax is for the $criteria array using IP address: eg:

current
PHP Code:
$criteria = array(
  
"col_19" => $_POST["Email"]
); 

would it be?
PHP Code:
$criteria = array(
  
"col_19" => $_POST["Email"],
  
"ip_address" => $_POST["ip_address"]
); 

I guess my confusion is that the form isn't actually posting the ip address as a hidden field and FT seems to be adding the IP field, so I'm not sure how to structure the variable name.
Reply
#2
Hi fourmat,

Good question! You had the syntax right, just not the way of extracting the user's IP address. Try this:

PHP Code:
$criteria = array(
  
"col_19" => $_POST["Email"],
  
"ip_address" => $_SERVER["REMOTE_ADDR"]
); 

Let me know if that doesn't work!

- Ben
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)