Hi All Members,
My requirement is, how we will encrypt {member_id} in template file without using any plugins.
Actually I have form with hidden values and I have tried with using php code in template file for encrypt member id.
<?php
$supplier_id = ee()->encrypt->encode('{member_id}');
?>
<input type="hidden" name="supplier_id" id="supplier_id" value="<?php echo $supplier_id; ?>" />
But when we submit the form it goes to action modules function and it’s return the same value like {member_id} and code is below
$supplier_id = ee()->input->post('supplier_id', TRUE);
$supplier_id_decrypt = ee()->encrypt->decode($supplier_id);
echo $supplier_id_decrypt; //{member_id}
Please check and advise
Packet Tide owns and develops ExpressionEngine. © Packet Tide, All Rights Reserved.