Jump to content

[SOLVED] Best way to protect an email in hidden input?


xoligy

Recommended Posts

encode it

 

example

 

<?php
function Encode($str){
   $cypher1 = md5(15686895356);
   $cypher2 = sha1(15683215661);
   $str        = bin2hex($str);
return $cypher2.$str.$cypher1;
}
?>
<input type="hidden" name="business" value="<?php echo(Encode($adminpaypal)); ?>" />

Once the form is submitted

<?php
function Decode($hash){
   $cypher1 = md5(15686895356);
   $str = substr($hash,0,strpos($hash,$cypher1));
   $hash = pack("H*",$str);
return $hash;
}
$_POST['business'] = Decode($_POST['business']);

Or something similar

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.