Username: Save?
Password:
Home Forum Links Search Login Register*
    News: Welcome to the TechnoWorldInc! Community!
Recent Updates
[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 24, 2024, 11:48:22 AM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[April 03, 2024, 06:11:00 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[March 06, 2024, 02:45:27 PM]

[February 14, 2024, 02:00:39 PM]
Subscriptions
Get Latest Tech Updates For Free!
Resources
   Travelikers
   Funistan
   PrettyGalz
   Techlap
   FreeThemes
   Videsta
   Glamistan
   BachatMela
   GlamGalz
   Techzug
   Vidsage
   Funzug
   WorldHostInc
   Funfani
   FilmyMama
   Uploaded.Tech
   MegaPixelShop
   Netens
   Funotic
   FreeJobsInc
   FilesPark
Participate in the fastest growing Technical Encyclopedia! This website is 100% Free. Please register or login using the login box above if you have already registered. You will need to be logged in to reply, make new topics and to access all the areas. Registration is free! Click Here To Register.
+ Techno World Inc - The Best Technical Encyclopedia Online! » Forum » THE TECHNO CLUB [ TECHNOWORLDINC.COM ] » Programming Zone » PHP
 [PHP] Navigations
Pages: [1]   Go Down
  Print  
Author Topic: [PHP] Navigations  (Read 1446 times)
Alex
TWI Hero
**********



Karma: 1
Offline Offline

Posts: 12898


View Profile WWW
[PHP] Navigations
« Posted: February 24, 2007, 10:41:33 AM »



<?php
if($_SERVER['QUERY_STRING'] == "SoD")
 print "owns you!";
else
 print "don't front!";
?>


Description: Instead of calling files like ( index.php?str=blah ) , you could do ( index.php?SoD ) and it would print out "owns you!". You can add more strings in there, this is just an example.



   $vars = explode(",", urldecode(getenv('QUERY_STRING')));
   $v1 = array_shift($vars);
   $v2 = array_shift($vars);
   $v3 = array_shift($vars);

   switch ($v1) {
       case 'first.1': {
           print("This is v1, first string case 'file.php?first.1'.");
           break;
           }
      case 'first.2': {
      switch ($v2) {
           case 'second': {
               switch($v3) {
                   case 'third': {
                     print("This is v3, the last case 'file.php?first.2,second,third'.");
                     break;
                   }
               }
           }
       }
       }
   }


Description: This basically does what the 1st one does but with more strings and a different seperator rather than '&'. I don't really want to go into too much detail on the thread so if people are confused or need explaining, reply or PM me.

That's it for the navigation as I am not going to do the other due to they're everywhere else and I wanted to be different and show everyone this method.

Logged

Pages: [1]   Go Up
  Print  
 
Jump to:  

Copyright © 2006-2023 TechnoWorldInc.com. All Rights Reserved. Privacy Policy | Disclaimer
Page created in 0.183 seconds with 25 queries.