// Prepare radiolist value which will be used in SQL statement. // In this function, we convert the returned value into the ones that are // stored in the database. // // Arguments: // radiolist ; the integer value of radiolist parameter in the // GetPOI request. // // Returns: // radio_value ; the value that can be used to construct the right SQL // statement. function GetRadioValue ($radiolist) { // if $radiolist exists, prepare radio_value. if( isset( $radiolist ) ) { $radio_value; // if $radiolist == 1, return $radio_value =”sale”; // if $radiolist == 2, return $radio_value =”rent”; switch ($radiolist) { case ‘1’: $radio_value = “sale” ; break; case ‘2’: $radio_value = “rent” ; break; default: throw new Exception( “invalid radiolist value:”.$radiolist ); } //switch return $radio_value; }//if else { throw new Exception(“radiolist parameter is not passed in GetPOI request.”); }//else