Hello all,
I have the following snipped:
$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;
echo "<input type='hidden' name='hiddenId' value='$id'>";
However, I need to preserve the value of this hidden field, after post.
So instead of just having $id, I believe I must have, on the value element, the following:
<?php echo (isset($_POST['hiddenId'])) ? $_POST['hiddenId'] : $id; ?>
I’ve tried something like this, no joy.
$id = (isset($_GET['id'])) ? (int)$_GET['id'] : 0;
echo '<input type="hidden" name="hiddenId" value="'<?php echo (isset($_POST[\\'hiddenId\\'])) ? $_POST[\\'hiddenId\\'] : $id; ?>'">';
I’m missing something obvious isn’t it?
Can I have your help here please.
:injured:
Thanks
Márcio