DomingoSL
DomingoSL

Reputation: 15504

POST var on PHP

If this is the vam dump of Request (var_dump($_REQUEST);):

array(1) {
  ["gift_edit"]=>
  array(11) {
    ["name"]=>
    string(19) "IBM da colezionista"
    ["description"]=>
    string(0) ""
    ["validbegin"]=>
    array(3) {
      ["day"]=>
      string(2) "31"
      ["month"]=>
      string(1) "1"
      ["year"]=>
      string(4) "2013"
    }
    ["validend"]=>
    array(3) {
      ["day"]=>
      string(1) "3"
      ["month"]=>
      string(1) "3"
      ["year"]=>
      string(4) "2015"
    }
    ["redemption"]=>
    string(13) "1234567888844"
    ["points"]=>
    string(4) "1200"
    ["price"]=>
    string(4) "6000"
    ["discount"]=>
    string(2) "20"
    ["codelist"]=>
    string(33) "unoperibm
dueperibm
treperibm
"
    ["amount"]=>
    string(0) ""
    ["_token"]=>
    string(40) "f2389c3d302630a624c10660aac218d279953d06"
  }
}

How do you retrieve codelist?

Upvotes: 0

Views: 79

Answers (3)

Guerra
Guerra

Reputation: 2790

Try:

$test = $_REQUEST['gift_edit']['codelist'];   

Upvotes: 1

John M.
John M.

Reputation: 2264

$_REQUEST['gift_edit']['codelist'] or $_POST['gift_edit']['codelist'].

Upvotes: 4

WhoaItsAFactorial
WhoaItsAFactorial

Reputation: 3558

You could access it with the following code.

$_REQUEST['gift_edit']['codelist']

Upvotes: 1

Related Questions