Changeset 361


Ignore:
Timestamp:
Nov 1, 2009 11:33:42 AM (15 years ago)
Author:
quinn
Message:

Added putFormData function.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/lib/Utilities.inc.php

    r348 r361  
    754754}
    755755
     756/*
     757* Sets a $_GET or $_POST variable.
     758*
     759* @access   public
     760* @param    string  $key    The key of the request array to set.
     761* @param    mixed   $val    The value to save in the request array.
     762* @return   void
     763* @author   Quinn Comendant <quinn@strangecode.com>
     764* @version  1.0
     765* @since    01 Nov 2009 12:25:29
     766*/
     767function putFormData($key, $val)
     768{
     769    if ('POST' == getenv('REQUEST_METHOD')) {
     770        $_POST[$key] = $val;
     771    } else if ('GET' == getenv('REQUEST_METHOD')) {
     772        $_GET[$key] = $val;
     773    }
     774}
     775
    756776/**
    757777 * Signs a value using md5 and a simple text key. In order for this
Note: See TracChangeset for help on using the changeset viewer.