Otro detallito:
Código PHP:
header("Location:gracias.htm");
exit;
} else {
header("Location:error.htm");
exit;
Entre el Location: y la pagina que redireccionas (link/url) .. debes usar un espacio .. sino, será interpretado como una cabecera ?¿?
Código PHP:
header("Location: gracias.htm");
exit;
} else {
header("Location: error.htm");
exit;
Un saludo,