Possible Duplicate:
Secure hash and salt for PHP passwords
I have:
$insert_query = 'insert into '.$this->tablename.'(
        name,
        email,
        username,
        password,
        confirmcode
        )
        values
        (
        "' . $this->SanitizeForSQL($formvars['name']) . '",
        "' . $this->SanitizeForSQL($formvars['email']) . '",
        "' . $this->SanitizeForSQL($formvars['username']) . '",
        "' . md5($formvars['password']) . '",
        "' . $confirmcode . '"
        )';   
I would like to salt and properly sha256 hash the password instead of using md5, how would I salt it properly? Is it secure enough to save the salt pass in the php file?
 
     
    