How can I read the value of a cookie

How can I read the value of a cookie

arlowarlow Posts: 6Questions: 3Answers: 0

I need to retrieve the value of a cookie so that I can set the where clause value $bn

->where('buyer_number',$bn)
->process( $_POST )
->json();

Answers

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    In PHP to read a cookie, use the super global $_COOKIE. See the PHP documentation on cookies for more information.

    Allan

  • arlowarlow Posts: 6Questions: 3Answers: 0

    Thanks but it doesn't seem to pickup the cookie value for some reason.

  • allanallan Posts: 63,214Questions: 1Answers: 10,415 Site admin

    Try print_r($_COOKIE); to see all cookie values available. If it isn't in there, then there is something wrong somewhere else and I don't know about.

    Allan

This discussion has been closed.