NYCPHP Meetup

[nycphp-talk] What is $QUERY_STRING ?

D C Krook dkrook at hotmail.com
Tue Mar 11 16:41:12 EST 2003


Louie,

Your code should work with two simple changes when register globals is off:

Change:

$_SERVER[PHP_SELF]  to   $_SERVER['PHP_SELF']  // not strictly necessary
$_GET['$action']    to   $_GET['action']




>
>first i like to say that this subject dont realy
>have a lot of info so many people i know including myself having problem
>understanding it the first time,
>
>now i want to ask for the best way to deal with calling function
>in a url
>
>function one(){
>
>echo "bla bla";
>
>}
>
>function two(){
>echo "<a href=\\"$_SERVER[PHP_SELF]?action=one\\">one</a>";
>}
>
>switch($_GET['$action']){
>case "one":
>     one();
>     break;
>     default:
>     two();
>      break ;
>}
>

_________________________________________________________________
Help STOP SPAM with the new MSN 8 and get 2 months FREE*  
http://join.msn.com/?page=features/junkmail




More information about the talk mailing list