Created
November 3, 2015 15:20
-
-
Save peter279k/58ae9e73bbb0f58b913d to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
if(empty($_POST['user_name']) || empty($_POST["password"])) | |
{ | |
echo "invalid"; | |
} | |
else | |
{ | |
$people = 0; | |
if(!file_exists("people.txt")) | |
{ | |
file_put_contents("people.txt", "0"); | |
} | |
else | |
{ | |
$people = (int)file_get_contents("people.txt"); | |
$people = $people + 1; | |
@unlink("people.txt"); | |
file_put_contents("people.txt", $people); | |
} | |
$user_name = $_POST['user_name']; | |
$password = $_POST['password']; | |
echo "you're No." . $people . "visits this web."; | |
} | |
?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment