Question: My html page is 

```
<html>
    <head>

    </head>
    <body>
        <form name="uploadform" id="uploadform" method="POST" enctype="multipart/form-data"  action="ProfileBiodataUpload.php">

            <div>     <P3>Upload Biodata</P3></div>
            <div><input type="file" name="fileupload" id="fileupload"/></div>

            <div> <input type="submit" name="submit" id="submit" value="Upload"/> </div>
        </form>
    </body>
</html>

```

ProfilebiodataUpload.php page is

```
<?php
session_start();
if (isset($_POST['fileupload'])) {
    echo "filename set";
} else {
    echo 'filename not set';
}
?>

```

but here i am getting filename not set error when i am upload with file type.
how to solve this.?thanks in advance

Answer: 
Firebase could indeed handle hundreds of database operations every second (many more in fact). But this would be greatly over-engineered.

Instead of running a timer that updates every second on the server, simply store the start/stop times of the event and allow the clients to manage their own timers. This should not be done by decrementing by 1 every second (as setInterval and other client-side tools are not very exact) but by comparing the current timestamp to the end, and determining the difference.

```
timeout = setInterval(countDown, 1000);
function countDown() {
    setTime(Math.max(0, endsAt - Date.now()));
    if( endsAt <= Date.now() ) { clearInterval(timeout); }
}

function setTime(remaining) {
    var minutes = Math.floor(remaining / 60000);
    var seconds = Math.round(remaining / 1000);
    $('#timer').text(lpad(minutes) + ':' + lpad(seconds));
}

```

Most likely, the reason you want the server in charge of the timer is to make it "fair." But this isn't logical. If each user keeps their own "ticker" down to the end time, and the start/end time are fixed, there is nothing to hack here.
I was dealing with similar problem as you do.

The problem number one is that there is no server side code. Firebase is data storage and whatever logic you have to implement needs to be divided into database design and client side code.

The second problem how to make client listen to time stamp change from future to past if the actual time stamp field in database is not changed. 

Client can always ask for current server time by pushing time stamp placeholder and listening to change.

```
auction:{
  countdown:{
    ends_in: NUMBER_IN_MLS,
    start_time: TIME_STAMP
  }
}

users_current_time: TIMESTAMP_PLACEHOLDER

```

if user starts on the app and wants to see current auctions
the current server time is immediatelly pulled and the timer on client side starts from 0. - This action can be repeated everytime user goes Online. Now when the user pulls the auction he will get the time when it started and the duration. You also have the current server time and the time you are online. This should give you quite precise information on how much time is left.

Third problem: 
My bigger concern here would be security. The auction should be closed once the time is up however with only firebase as backend all clients still have write permission to submit their bids. 

I still would recommend some server which would do all the housekeeping and calculating the countdown.