This forum is no longer open and is for reading/searching only.

Please use our new MachForm Community Forum instead.

MachForm Community Forums » MachForm 4

One entry per day


  1. clctv
    Member

    I know there is a way i can limit to one entry per IP address, but is there a way I can limit to one entry per IP address per day? Thank you

    Posted 9 years ago #
  2. redityo

    You can change the limit logic to allow the same IP on next day.
    To do this edit includes/post-functions.php file and go to around line 1710, you will see these code :

    $query = "select count(id) total_ip from <code>&quot;.MF_TABLE_PREFIX.&quot;form_{$form_id}</code> where ip_address=? and <code>status</code>=1  " ;

    then change the sql to

    $query = "select count(id) total_ip from <code>&quot;.MF_TABLE_PREFIX.&quot;form_{$form_id}</code> where ip_address=? and <code>status</code>=1 and DATE_FORMAT(date_created,'%Y%m%d') = DATE_FORMAT(now(),'%Y%m%d') " ;

    MachForm Support

    Posted 9 years ago #

RSS feed for this topic

Reply