Codice PHP:
if ($_POST['c_p'] == $_POST['c_pa']) {
    
$c_p sha1($_POST['c_p']);
} else {
    
header("Location: register.php");

Neanche così va?