Grabbing parameter from URL

talkinggoat

Member
Grab a parameter from the URL to populate a field:

(I used a form element, but you could probably use Calc)
Using the HREF - https://www.example.com/index.php?ref=123&bat=456&cat=789
In the "Default" box, enter this PHP code.
PHP:
$name = htmlspecialchars($_GET["ref"]);
return $name;

$name is simply the variable you are assigning to your data.
'ref' is the parameter you want to retrieve. In this case, it can be 'bat' or 'cat'.

Click the Eval option, under your code and set it to "Yes".

Profit.
 
Thanks for the response. I'm not disagreeing with you, but could you explain the benefits of using it that way, vs the drawbacks of using my method?
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top