Sono riuscita a creare il codice da sola...
<?php session_start(); session_register("eta","spec","capacita_art","capacita_let","capacita_lin","capacita_psi","capacita_sci"); ?> <html> <head> <title>Iscrizione</title> <script type="text/javascript"> function ctr(id) { if (document.getElementById(id).checked==true) { if (document.getElementById(id).value=="artistico") { document.getElementById("cla").checked = false; document.getElementById("div_cla").style.display = "none"; document.getElementById("lin").checked = false; document.getElementById("div_lin").style.display = "none"; document.getElementById("psi").checked = false; document.getElementById("div_psi").style.display = "none"; document.getElementById("sci").checked = false; document.getElementById("div_sci").style.display = "none"; document.getElementById("div_" + id).style.display = ""; } else if (document.getElementById(id).value=="classico") { document.getElementById("art").checked = false; document.getElementById("div_art").style.display = "none"; document.getElementById("lin").checked = false; document.getElementById("div_lin").style.display = "none"; document.getElementById("psi").checked = false; document.getElementById("div_psi").style.display = "none"; document.getElementById("sci").checked = false; document.getElementById("div_sci").style.display = "none"; document.getElementById("div_" + id).style.display = ""; } else if (document.getElementById(id).value=="linguistico") { document.getElementById("art").checked = false; document.getElementById("div_art").style.display = "none"; document.getElementById("cla").checked = false; document.getElementById("div_cla").style.display = "none"; document.getElementById("psi").checked = false; document.getElementById("div_psi").style.display = "none"; document.getElementById("sci").checked = false; document.getElementById("div_sci").style.display = "none"; document.getElementById("div_" + id).style.display = ""; } else if (document.getElementById(id).value=="psicopedagogico") { document.getElementById("art").checked = false; document.getElementById("div_art").style.display = "none"; document.getElementById("cla").checked = false; document.getElementById("div_cla").style.display = "none"; document.getElementById("lin").checked = false; document.getElementById("div_lin").style.display = "none"; document.getElementById("sci").checked = false; document.getElementById("div_sci").style.display = "none"; document.getElementById("div_" + id).style.display = ""; } else if (document.getElementById(id).value=="scientifico") { document.getElementById("art").checked = false; document.getElementById("div_art").style.display = "none"; document.getElementById("cla").checked = false; document.getElementById("div_cla").style.display = "none"; document.getElementById("lin").checked = false; document.getElementById("div_lin").style.display = "none"; document.getElementById("psi").checked = false; document.getElementById("div_psi").style.display = "none"; document.getElementById("div_" + id).style.display = ""; } } else { document.getElementById("div_" + id).style.display = "none"; } } </script> <script language="javascript" src="select.js"> </script> <script language="javascript" src="bottoni.js"> </script> </head> <body> <form name="specializzazione" action="iscrizione5.php" method="post"> <? if ($professione == "studente") {?> <!-- codice studente --> <p>Età</p> <input name="bottone_età1a" type="button" onClick="banda(this.form, 'up')" value=" + "> <input name="eta" type="text" id="eta" onFocus="this.blur()" value="19" size="2"> <input name="bottone_età1b" type="button" onClick="banda(this.form, 'down')" value=" - "> <p>Specializzazione</p> <input type="checkbox" id="art" name="spec" value="artistico" onclick="ctr(this.id);"> Artistico <input type="checkbox" id="cla" name="spec" value="classico" onclick="ctr(this.id);"> Classico <input type="checkbox" id="lin" name="spec" value="linguistico" onclick="ctr(this.id);"> Linguistico <input type="checkbox" id="psi" name="spec" value="psicopedagogico" onclick="ctr(this.id);"> Psicopedagogico <input type="checkbox" id="sci" name="spec" value="scientifico" onclick="ctr(this.id);"> Scientifico <div id="div_art" style="display: none;"> <input type="text" name="capacita_art" value="20" disabled="disabled" size="5"> <input type="text" name="capacita_let" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_lin" value="0" disabled="disabled" size="5"> <input type="text" name="capacita_psi" value="10" disabled="disabled" size="5"> <input type="text" name="capacita_mat" value="5" disabled="disabled" size="5"> </div> <div id="div_cla" style="display: none;"> <input type="text" name="capacita_art" value="0" disabled="disabled" size="5"> <input type="text" name="capacita_let" value="20" disabled="disabled" size="5"> <input type="text" name="capacita_lin" value="10" disabled="disabled" size="5"> <input type="text" name="capacita_psi" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_mat" value="5" disabled="disabled" size="5"> </div> <div id="div_lin" style="display: none;"> <input type="text" name="capacita_art" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_let" value="10" disabled="disabled" size="5"> <input type="text" name="capacita_lin" value="20" disabled="disabled" size="5"> <input type="text" name="capacita_psi" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_mat" value="0" disabled="disabled" size="5"> </div> <div id="div_psi" style="display: none;"> <input type="text" name="capacita_art" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_let" value="0" disabled="disabled" size="5"> <input type="text" name="capacita_lin" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_psi" value="20" disabled="disabled" size="5"> <input type="text" name="capacita_mat" value="10" disabled="disabled" size="5"> </div> <div id="div_sci" style="display: none;"> <input type="text" name="capacita_art" value="10" disabled="disabled" size="5"> <input type="text" name="capacita_let" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_lin" value="5" disabled="disabled" size="5"> <input type="text" name="capacita_psi" value="0" disabled="disabled" size="5"> <input type="text" name="capacita_mat" value="20" disabled="disabled" size="5"> </div> </form> <? } else {?> <!-- codice impiegato --> <p>Età</p> <input name="bottone_età2a" type="button" onClick="banda2(this.form, 'up')" value=" + "> <input name="eta" type="text" id="eta" onFocus="this.blur()" value="27" size="2"> <input name="bottone_età2b" type="button" onClick="banda2(this.form, 'down')" value=" - "> <p>Specializzazione</p> <input type="text" name="capacità_art" size="5"> <input type="text" name="capacità_let" size="5"> <input type="text" name="capacità_lin" size="5"> <input type="text" name="capacità_psi" size="5"> <input type="text" name="capacità_mat" size="5"> <? } ?> <input type="submit" value="Continua" id="bottone"> </form> </body> </html>e funziona ^_^ (naturalmente la parte impiegato va completata...)
il problema è che cliccando sul bottone continua non mi va alla pagina seguente.
ho fatto alcune prove togliendo pezzi di codice e sono arrivata alla conclusione che riguarda solo il pezzo che ha a che fare con la specializzazione (togliendo quella infatti funziona tutto)....
qualcuno mi aiuta?