Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6682239
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T04:40:57+00:00 2026-05-26T04:40:57+00:00

I have built a Facebook app for a client, this app allows the user

  • 0

I have built a Facebook app for a client, this app allows the user to enter their details and guess a figure to be entered into a competition. The app is run via an iframe.

Is there any possible way of only letting the user submit the form 5 times maximum within 24 hours (preferably by facebook profile or IP address), then echo an error if they try to enter a 6th time. I have a php script that gathers the data and exports it to a csv file.

PHP form code:

<?php
if($_POST['formSubmit'] == "Submit")
{
    $errorMessage = "";

  if(empty($_POST['formName']))
  {
    $errorMessage .= "<li>You forgot to enter your name.</li>";
  }
  if(empty($_POST['formTown']))
  {
    $errorMessage .= "<li>You forgot to enter your town.</li>";
  }
  if(empty($_POST['formEmail']))
  {
    $errorMessage .= "<li>You forgot to enter your email.</li>";
  }

    $varName = $_POST['formName'];
    $varTown = $_POST['formTown'];
    $varAge = $_POST['formAge'];
    $varEmail = $_POST['formEmail'];

    $varOne = $_POST['hidden-one'];
    $varTwo = $_POST['hidden-two'];
    $varThree = $_POST['hidden-three'];
    $varFour = $_POST['hidden-four'];
    $varFive = $_POST['hidden-five'];

    if(empty($errorMessage)) 
    {
        $fs = fopen("mydata.csv","a");
        fwrite($fs,"\n" . $varName . ", " . $varTown . ", " . $varAge . ", " . $varEmail . ", " . $varOne . $varTwo . $varThree . $varFour . $varFive);
        fclose($fs);

        header("Location: thankyou.php");
        exit;
    }
}
?>
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T04:40:58+00:00Added an answer on May 26, 2026 at 4:40 am

    The obvious solution is to log form submits to a database. For each submit you log the time and an identifier for the user (IP address, Facebook account, etc). This data can be used to check how many times the user submitted the form in the last 24 hours. If this is more than X times, you do not store the data and inform the user.

    But this solution assumes you have access to a database.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have built an app using the facebook canvas method. This works in Mozilla
I have a website built using MySQL, can a facebook app be built sharing
I have an application that allows the user to send a picture. This picture
I have a Facebook app that is built as an iFrame. I am using
I have an app. I want to integrate Facebook to this. I want to
I have a Facebook app that is built in PHP and have added a
I've been following this guide on integrating Facebook into my app. Everything is going
I have built a simple C#.Net app on a M/C with only .Net FX
I have built a number of asp.net servercontrols into a class library, & I
I've been asked to develop a facebook application that allows users of their current

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.