note 112561 deleted from language.oop5 by googleguy

From: Date: Sun, 30 Jun 2013 01:44:13 +0000
Subject: note 112561 deleted from language.oop5 by googleguy
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-195400@lists.php.net to get a copy of this message
Note Submitter: KMCD00 ---- This will help beginners. Please don't remove this. Ever wonder how YouTube pulls of the /watch?v=471Jf887 thing which allows them to put all videos on a single page? Here's how. Part 1 - PHP <?php // replace foo with your chosen variable $foo = $_GET["foo"]; // next use the if statement to find the defined text if ( $foo == 'somevalue' ){ // choose what to do if foo = somevalue echo $foo; // in this case I chose just to display it as text }else if ( $foo == 'othervalue' ){ // if foo = othervalue we want to say something else echo "We don't like other value."; echo $foo; }else { echo "What?"; } Part 2 - URL Ok this is the part that is simple. Just make a link to the page like so. http://www.example.org/test.php?foo=somevalue

« previous php.notes (#195400) next »