note 112561 added to language.oop5

From: Date: Sun, 30 Jun 2013 00:46:26 +0000
Subject: note 112561 added to language.oop5
Groups: php.notes 
Request: Send a blank email to php-notes+get-195399@lists.php.net to get a copy of this message
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 ---- Server IP: 69.147.83.199 Probable Submitter: 75.27.137.212 ---- Manual Page -- http://php.net/manual/en/language.oop5.php Edit -- https://master.php.net/note/edit/112561 Del: integrated -- https://master.php.net/note/delete/112561/integrated Del: useless -- https://master.php.net/note/delete/112561/useless Del: bad code -- https://master.php.net/note/delete/112561/bad+code Del: spam -- https://master.php.net/note/delete/112561/spam Del: non-english -- https://master.php.net/note/delete/112561/non-english Del: in docs -- https://master.php.net/note/delete/112561/in+docs Del: other reasons-- https://master.php.net/note/delete/112561 Reject -- https://master.php.net/note/reject/112561 Search -- https://master.php.net/manage/user-notes.php

« previous php.notes (#195399) next »