Javascript hex_md5 pin number
<p>I have the following script which ask's for a pin number, it is encrypted as md5, but when i type in any value it validates, it should only do it for 1234 or 4321,i have to run 2 different if statements as im getting the pin number from the database and using a PHP foreach statement to echo them out.</p>

<pre><code>&lt;script&gt;
function pinSave()
{
    var validate=prompt("Enter your PIN","Enter your PIN");
    if (validate != '' &amp;&amp; validate != null) {

        if (hex_md5(validate) == '81dc9bdb52d04dc20036dbd8313ed055')
            return true;
        else
        {
            alert('The PIN you entered is not correct.');
            return false;
        }           
        if (hex_md5(validate) == 'd93591bdf7860e1e4ee2fca799911215')
            return true;
        else
        {
            alert('The PIN you entered is not correct.');
            return false;
        }           

    } else {
        return false;
    }
}
</code></pre>

<p></p>
