PDA

View Full Version : PHP script for passing parameter



ecamador
01 Mar 2007, 08:38 PM
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.

spasticus
03 Mar 2007, 08:43 AM
$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..."
}