Login   Register  
PHP Classes
elePHPant
Icontem

File: coco.queryparse.php4

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Matthias Richter  >  phpMyCoCo  >  coco.queryparse.php4  >  Download  
File: coco.queryparse.php4
Role: ???
Content type: text/plain
Description: hack around impropoer http_get_vars
Class: phpMyCoCo
Author: By
Last change:
Date: 2001-03-11 13:51
Size: 947 bytes
 

Contents

Class file image Download
<?php
class cocoQUERYPARSER
{
  // This could be accomplished  much easier unless some
  // PHP-Versions were not installed broken and offered no
  // $HTTP_GET_VARS ;-(
  function parseQueryString()
  {
    global $HTTP_SERVER_VARS;
    $tmp = split("&", $HTTP_SERVER_VARS[QUERY_STRING]);
    $myhttpvars = array();
    $mycounter = 0;
    while($tmp[$mycounter]!="")
    {
      $thepair = split("=",$tmp[$mycounter]);
      $myhttpvars[$thepair[0]]=$thepair[1];
      $mycounter++;
    }
    $pgid = $myhttpvars[pgid];
    if($myhttpvars[paid])
    {
      $paid = $myhttpvars[paid];
    } else {
      $paid = 0;
    }
    if($myhttpvars[cid])
    {
      $cid=$myhttpvars[cid];
    } else {
      $cid=0;
    }
    $action = $myhttpvars[action];
    $myreturnval = array(
      "action" => $action,
      "pgid" => $pgid,
      "paid" => $paid,
      "cid" => $cid);
    return $myreturnval;
  }
}
?>