Prueba esto. Si no lo entiendes pregunta:
Código PHP:
<html>
<head>
<script>
//Chapucilla de KarlanKas
preguntas=["sobre moda","sobre coches",,"caliente"] //Si quieres pon aquí de qué va cada pregunta
function comprobar(){
anterior="";
numeroPregunta=-1;
chequeados=-1;
respondido=new Array();
for(a=0;a<document.forms[0].elements.length;a++){
elemento=document.forms[0].elements[a];
//Descubrir las preguntas con radio
if(elemento.type=="radio"){
pregunta=elemento.name;
//Contador de preguntas con radio
if(pregunta!=anterior){numeroPregunta+=1;
anterior=pregunta}
//Ver si se ha contestado
if(elemento.checked){
chequeados+=1;
respondido[numeroPregunta]=true;
}
}
}
//Recapitulación
//Si se han contestado menos que preguntas
if(chequeados!=numeroPregunta){
//Se empieza a generar el mensaje de alerta
codigo="Le ha faltado contestar a\n";
for(a=0;a<numeroPregunta+1;a++){
//Se comprueba si se ha contestado
if(!respondido[a]){
codigo+="\nla pregunta ";
//Descubrir si se ha puesto tema a la pregunta
if(preguntas[a]){
codigo+=preguntas[a]
}
//Si no se ha puesto pone el número
else{
codigo+="nº "+(a+1);
}
}
}
//Se termina el mensaje de la alerta
codigo+="\n\nPor favor corrijalo";
//Se muestra la alerta
alert(codigo);
//Se anula el envío
return false;}
}
</script>
<title>Untitled</title>
</head>
<body>
<form action="ee" onsubmit="return comprobar()">
<input type="radio" name="pepe" value="1">1<br>
<input type="radio" name="pepe" value="2">2<br>
<input type="radio" name="pepe" value="3">3<br>
<input type="radio" name="pepe" value="4">4<br><br>
<input type="radio" name="pepe1" value="1">1<br>
<input type="radio" name="pepe1" value="2">2<br>
<input type="radio" name="pepe1" value="3">3<br>
<input type="radio" name="pepe1" value="4">4<br><br>
<input type="radio" name="pepe2" value="1">1<br>
<input type="radio" name="pepe2" value="2">2<br>
<input type="radio" name="pepe2" value="3">3<br>
<input type="radio" name="pepe2" value="4">4<br><br>
<input type="radio" name="pepe3" value="1">1<br>
<input type="radio" name="pepe3" value="2">2<br>
<input type="radio" name="pepe3" value="3">3<br>
<input type="radio" name="pepe3" value="4">4<br><br>
<input type="submit">
</form>
</body>
</html>