Jump to content

dogbot

New Members
  • Posts

    3
  • Joined

  • Last visited

    Never

Posts posted by dogbot

  1. NEWBIE ALERT:

    New to Programming

    Newer to PHP

    Bad at formulating coherent questions.....so here it goes....

     

    Could someone explain

    $fieldname = $_REQUEST['fieldname']

     

    I understand "$_REQUEST An associative array that by default contains the contents of $_GET, $_POST and $_COOKIE"

     

    I also understand you call the member of an array like so: 

    <?php
    $arr = array("foo" => "bar", 12 => true);
    
    echo $arr["foo"]; // bar
    echo $arr[12];    // 1
    ?>

     

    So I would expect that if someone wants to use something from the $_REQUEST Array they would use:

    $fieldname = $_REQUEST['$_GET']

    So I do not understand why "$fieldname" is inside the brackets.I suspect they might be setting this up to use $fieldname instead of $_REQUEST maybe...but why, that would be redundant? so I suspect I suspect wrong....

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.