-3

I have two PHP files: A.php and B.php. A passes $id to B using POST and B can get $id the first time but I need to jump back to B again using Header. This time the parameter gets lost.

How can I pass the parameter when I use Header to jump back?

rink.attendant.6
  • 44,500
  • 61
  • 101
  • 156
lovingd7
  • 3
  • 2

2 Answers2

0

you can pass id variable in the query string when you redirect.

0

You must Use $_REQUEST instead of $_POST so it will work in both case . and when you use header to jump back again use query string with same name.

Pankaj Pareek
  • 3,806
  • 2
  • 31
  • 42
  • Or you $_POST and then $_GET, because those are the actions. $_REQUEST is fine but if you want to be sure about the verb you shouldn't use it – Damien Pirsy Dec 03 '13 at 07:14