topical media & game development

talk show tell print

professional-ria-04-helloResponsev1.php / php



  <?php
  /*
  First version of helloResponse.php.
     
  This version includes:
    - basic lookupMessage function - builds a text based 
      response based on country argument
  */  
     function lookupMessage(mCountry) 
     {
         if (mCountry == "France")
           return 'Bonjour Monde!';
         else if (mCountry == "Germany")
           return 'Hallo Welt!';
         else if (mCountry == "Spain") 
           return 'Hola Mundo!';
         else if (mCountry == "USA") 
           return 'Hello World!';
         else 
           return 'Unknown Message!';
     }
   ?>
  <?php echo lookupMessage(_GET['country'])?>
  


(C) Æliens 20/2/2008

You may not copy or print any of this material without explicit permission of the author or the publisher. In case of other copyright issues, contact the author.