I've been trying to the same thing, and getting stuck on how to have variables persist across snippets.
Using the hidden field with a post method creates a $_POST['myvariable'] that persists, but it also includes the value in the resource html - and so is open to manipulation.
What I was hoping to do is run a snippet using a property passed from the chunk, and have the snippet set a variable then open a new resource. Upon opening the new resource would then run another snippet to find the relevant data from a db table and present it via another chunk. In theory I believe the second resource could send the retrieved values to PayPal for the checkout process. All that to avoid the "hidden" but easily manipulated data.
Maybe there's a simpler way to do that.
So far I've got this far - this does seem to successfully pass the $IDprint value:
The form and button on the product page:
<td class="buy_button" width="120">
<form action="[[!getMYpid? &IDprint=`[[+id]]`]]" method="post" >
<input type="image" src="assets/gfx/Add2Cart.png" alt="Click to submit"/>
</form>
</td>
The getMYpid snippet is what has me baffled - it does not seem possible to create a persistent variable ...
<?php
/**
* get the IDprint property passed by the buybutton form
*/
$PrintID = $scriptProperties['IDprint'];
/**
* attempting to create superglobal variable - not working
*/
$_POST['IDprint'] = $PrintID;
/**
* code to open resource 11
*/
$webLink = "[[~11]]";
return $webLink;
I can't get it working, but others more adept with php will probably have a solution. meltingdog - this may be of use to you