Skip to content

Instantly share code, notes, and snippets.

@randyjhunt
Created March 30, 2009 07:29
Show Gist options
  • Select an option

  • Save randyjhunt/87674 to your computer and use it in GitHub Desktop.

Select an option

Save randyjhunt/87674 to your computer and use it in GitHub Desktop.
Get variable from URL
<?php // get the value of "variable" from the URL
$val = $_GET['variable'];
?>
<?php
if ( $val == "yeah" ) {
echo "the variable is YEAH!";
} ?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment