Código PHP:
  
   <form name='shout2' action='index.php?a=perfil&id=".$id."&b=comment&cate=10' method=post>
<?
 if ($b == "comment")
 {
     if ($mensajed == '')
      {
             echo '<script language="javascript">
         alert("El mensaje esta vacio.");
             location.href=("index.php?a='.$a.'&id='.$id.'")
             </script>';
      }
 }
?>    
 

