I included a file at the top in the main index.php file and I am having trouble making a variable in it (the included file) constant (static)  

 --**More Info**--: So I am trying to make a form. For each time the user submits successfully, the form should make a new file (with his name and a paragraph of his feedback). So, I made a counter and attached it to the file name, so every-time when submitting.. a new file is made 

```
static $counter = 3;
if ($_SERVER["REQUEST_METHOD"] == "POST") {
    // validation code
    if( /* checking that the submission is successful */){

       $file = "feedback". $GLOBALS['counter'] .".txt";
       file_put_contents( $file, $feedback_paragraph );
       $GLOBALS[ 'counter' ] = $GLOBALS [ 'counter' ] +  1;
    }
}

```

The problem is that the counter stays the same. It just increases to 4 and resets back to 3 when submitting again. I don't know why?

**Note:** I know it's not the best way to implement such project, but I still want to understand how php works and why this code is not working?

Thanks everyone. You're such an amazing community!