PHP/Login Authentication/md5
Get uniqid
<source lang="html4strict">
<? $id = uniqid("phpuser"); echo "$id"; ?>
</source>
md5 and uniqid
<source lang="html4strict">
<? $id = md5(uniqid(rand())); echo "$id"; ?>
</source>
Use md5 function to encrypt text
<source lang="html4strict">
<?php
$val = "secret"; echo "Pre-hash string: $val
"; $hash_val = md5 ($val); echo "Hashed outcome: $hash_val";
?>
</source>