I am trying to display a warning message on my main page, which is index.php. I use the second file to insert the number of clicks on the button. But the user should be able to vote only every 5 minutes. He should display their warning message if the vote failed or succeeded.
Now it always displays both buttons on index.php.
Index.php
<html>
<body>
<?php
include_once 'resources/method.php';
?>
<form id="button1" action="resources/method.php" method="post">
<input type="submit" value="VOTE"/>
</form>
</body>
</html>
method.php
<?php
?>
<div class="alert">
Wait 5mins
</div>
<?php
?>
<div class="alert">
Success!
</div>
<?php
?>
<?php
header ( 'Refresh: 5; URL=/project/index.php' );
?>
Here is the scenario of what I'm stuck with right now. Fiddle (this is optional)
" 5 ", 5 , "!" , 5 . "", .