If you pass some variable values from one form to another using hidden variables, how do you subsequently refer to those variables? For example, through a form on the first page the client indicates their country, so that value would be a $_POST variable (?)...
then on the second page they enter their email address and an email is sent to them showing all their data. When replacing variables for use in the email, is the value of $country referred to as a $_POST variable or as just $country? Which is correct? This...Code:<input type="hidden" name="country" value="<?php echo $_POST['country']; ?>">
or this?Code:$body = str_replace('%country%',$country, $body);
Or is there a better way to accomplish this?Code:$body = str_replace('%country%',$_POST['country'], $body);
Thanks.



Reply With Quote



Bookmarks