Results 1 to 2 of 2

Thread: PHP script for passing parameter

  1. #1
    Join Date
    Feb 2007
    Posts
    29

    PHP script for passing parameter

    Hi Guys,

    I need php script that perform passing value.

    example: http://yourdomain.com/test.php?variable=value
    echo $variable;


    I hope you can help me on this since i'm not yet a PHP guru.
    I appreciate the actual coding if I'm not asking too much.

    Thanks a lot in advance.

  2. #2
    Join Date
    Oct 2006
    Location
    UK - Wales
    Posts
    72
    $variable = $_GET['variable'];

    switch ($variable) {
    case 0:
    echo "what ever you want if the variable is 0";
    include("maybe_include_a_different_page.php");
    break;
    case "something":
    echo "i think that would work";
    break;
    case "and so on..."
    }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •