Last active
December 10, 2015 22:38
-
-
Save marcamos/4503420 to your computer and use it in GitHub Desktop.
Use PHP to show (or not show) something based on the existence (or lack of) a particular parameter.
This file contains 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 (isset ($_GET["preview"])) { ?> | |
"Preview" exsists as a URL parameter | |
<? } ?> | |
<?php if (!isset ($_GET["preview"])) { ?> | |
"Preview" does not exsist as a URL parameter | |
<? } ?> | |
<?php if ($_GET["preview"] == "true") { ?> | |
"Preview" has a value of "true" | |
<? } ?> | |
<?php if ($_GET["preview"] !== "true") { ?> | |
"Preview" does not have a value of "true" | |
<? } ?> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment