mirror of
https://github.com/FranP-code/Visit-counter.git
synced 2025-10-12 23:52:54 +00:00
readme added
This commit is contained in:
38
definer.php
38
definer.php
@@ -1,20 +1,20 @@
|
||||
<?php
|
||||
|
||||
$visitas = htmlspecialchars($_POST['visitas']);
|
||||
|
||||
function backToLife() {
|
||||
header('Location: ./definer.html');
|
||||
}
|
||||
|
||||
if (!isset($visitas)) {
|
||||
backToLife();
|
||||
}
|
||||
|
||||
if ($visitas >= 0 && $visitas <= 9999) {
|
||||
file_put_contents('./visits.txt', $visitas - 1);
|
||||
header('Location: ./index.php');
|
||||
} else {
|
||||
backToLife();
|
||||
}
|
||||
|
||||
<?php
|
||||
|
||||
$visitas = htmlspecialchars($_POST['visitas']);
|
||||
|
||||
function backToLife() {
|
||||
header('Location: ./definer.html');
|
||||
}
|
||||
|
||||
if (!isset($visitas)) {
|
||||
backToLife();
|
||||
}
|
||||
|
||||
if ($visitas >= 0 && $visitas <= 9999) {
|
||||
file_put_contents('./visits.txt', $visitas - 1);
|
||||
header('Location: ./index.php');
|
||||
} else {
|
||||
backToLife();
|
||||
}
|
||||
|
||||
?>
|
||||
Reference in New Issue
Block a user