Results 1 to 7 of 7

Threaded View

  1. #1
    Join Date
    Oct 2012
    Posts
    9
    Plugin Contributions
    0

    Default Recommended method to capture GET parameters?

    All,

    What's the best way to capture a GET parameter passed when the main page is invoked similarly to http://site.here/index.php?main_page=index&a_parameter=some_value

    One way is to add a section to application_top.php, like this:

    if ( isset($_GET["a_parameter"]) )
    {
    $_SESSION["a_parameter"] = $_GET["a_parameter"];
    setcookie("a_parameter", $_GET["a_parameter"], time() + 60*60*24*3, "/");

    }


    While this works, it makes upgrades more complicated. Is there a better way, maybe in the form of attaching to a notification message? If I can keep the code outside of the standard application_top.php, upgrade would be simpler.

    Thanks!
    Last edited by lsb57; 17 Jan 2013 at 10:05 PM.

 

 

Similar Threads

  1. Replies: 1
    Last Post: 29 Aug 2013, 04:46 AM
  2. Products.php - Inserting data from get method?
    By Solarpitch in forum General Questions
    Replies: 3
    Last Post: 25 Aug 2008, 04:02 AM
  3. form get method?
    By redxiii in forum Addon Payment Modules
    Replies: 1
    Last Post: 10 Jan 2007, 09:31 AM
  4. Custom Dynamic Extra Pages with URL parameters, GET, POST - for Define and EZ Pages
    By bjoly in forum Templates, Stylesheets, Page Layout
    Replies: 2
    Last Post: 24 Jul 2006, 04:04 AM
  5. Can't get shipping to work (zone method)
    By therealex in forum Built-in Shipping and Payment Modules
    Replies: 5
    Last Post: 18 Jun 2006, 08:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
disjunctive-egg