get variable to pass through form

DomboCom

New member
Jun 4, 2009
381
8
0
I'm trying to pass keywords through a form. So if my link is httpx://mysite.com?t202kw=abc

I want 't202kw' variable to pass through and remain in the link on the next page (after the form is submitted). I think I can add this to my form:

<input type="hidden" name="t202kw" value="" />


But how do I grab the variable (abc) and enter it as the "value"? I tried using get with php, but that didn't seem to work.


thanks
 


did you try putting <?=$_GET['t202kw'];?> into the quoted area for value="" ?

Course that only works if the page that loaded the form got that in the url, but if it was in a url a few redirects before it could have gotten lost.
 
  • Like
Reactions: DomboCom
what does the generated source look like on the page (after the form is submitted)? Anything look out of place? Also, is the second page on a different server?
 
did you try putting <?=$_GET['t202kw'];?> into the quoted area for value="" ?

Course that only works if the page that loaded the form got that in the url, but if it was in a url a few redirects before it could have gotten lost.

I'm a dumbass. I was trying to echo the value like
value="<?php $t202kw= $_GET['t202kw']; echo "$t202kw"; ?>"

Thanks kblessinggr. I'm keeping track of how many times I owe you.

+rep