Last active
September 12, 2018 12:38
-
-
Save wickywills/a441b2ff192e7f153fe9519d237b6b47 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 | |
session_start(); | |
if (!isset($_SESSION['views'])) { | |
$_SESSION['views'] = 0; | |
} | |
$_SESSION['views'] = $_SESSION['views']+1; | |
if ($_SESSION['views'] == 1) { | |
// Do something | |
} | |
if ($_SESSION['views'] == 2) { | |
// Do something else | |
} | |
``` |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment