tal ves esto pueda ser de ayuda
Código PHP:
<?
$consultaInformacion=("SELECT * FROM tabla where dato='tu dato'");
$row = mysql_fetch_array($consultaInformacion);
if($row=0)
{
?>
<script languaje="javascript">
function Validar()
{
alert('¡¡¡No existe el Regristo!!!');
window.location='tupagina.php';
}
Validar();
</script>
<?
}
?>