Page 1 of 1

if I receive value from $_GET, can i POST it back to...

Posted: Thu Sep 23, 2004 1:26 pm
by voltrader
if I receive variable from $_GET, can i POST it back to same php page for further processing?

1) I send ?ref=1 to page 2

2) display some stuff based on $_GET['ref'] in page 2

3) on submission of form back to page 2 for processing, I seem to lose $_GET['ref']
I thought I could make it persistant to the page by making it an INPUT TYPE=hidden variable in HTML, but that didn't work.

What am I missing here?

Posted: Thu Sep 23, 2004 1:45 pm
by feyd
when posting back, $_GET['ref'] won't exist, unless you passed ref through the action's url.

Posted: Thu Sep 23, 2004 2:02 pm
by voltrader
I think I understand now. I should echo the hidden variable value from within the script so that it becomes part of page 2. Thanks.

Posted: Thu Sep 23, 2004 2:08 pm
by timvw
or use a session or cookie