If I have a form that submits to a page with a form on it and I want to pass the value of a hidden field from the first to the second, is it possible to store the value in $_SESSION and print it in the chunk that loads?
How?
When the user submits the form below they go to a page called sendcard with a form on it. In several places in the HTML I need the value of the hidden input "card." I thought that I could call a snippet with
<?php
$_SESSION['card'] = $fields['card'];
?>
when the form submits, then create a variable like $card = $_SESSION[’card’] and return $card then, in the html on the sendcard page have something like <img src="/assets/images/card[+$card+].jpg" /> but that totally doesn’t work.
I’ve read the multipart form example but don’t know how to apply it to this case. Please help.
<form id="ecard" action="/sendcard" method="post">
<fieldset>
<input name="card" type="hidden" value="1" />
<input name="subject" type="hidden" value="IF SANTA HAD A THEME PARK, THIS WOULD BE IT!" />
<input id="ecard1" type="image" src="/assets/media/images/ecards/card1.jpg" title="Customize and Send This Ecard" />
<label for="ecard1">If Santa Had a Theme Park, This Would Be It!</label>
</fieldset>
</form>