Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- //secret key for encoding form field
- $_SESSION['__form_key']=$secret=bin2hex(openssl_random_pseudo_bytes(16));
- $input=array();
- foreach ($filed_names as $v){
- $hashed_name=hash_hmac('md5',$v,$secret);
- if(isset($_POST[$hashed_name])){
- $input[$v]=$_POST[$hashed_name];
- }
- }
- ?>
- <form action='<? echo htmlentities($_SERVER['PHP_SELF']); ?>' method='POST'>
- username: <input type='text' name='<?= hash_hmac('md5','login',$secret); ?>' />
- password : <input type='password' name='<?= hash_hmac('md5' , 'password',$secret); ?>' />
- <input type='submit' name='<?= hash_hmac('md5','submit',$secret); ?>' />
- </form>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement