Questo è il file prenota.php
codice HTML:
<head>
<title>Ospedale</title>id_
<meta charset="utf-8">
<script type = "text/javascript" src = "http://www.google.com/jsapi"></script>
<script type = text/javascript> google.load('jquery', '2.2.0');
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.2.0/jquery.min.js" type="text/javascript"></script>
<script type="text/javascript" src="js/slider.js"></script>
<script type = text/javascript>
$document.ready(function() {
var scegli = '<option value="0">Effettua una scelta..</option>';
var attendere = '<option value="0">Operazione in corso..</option>';
$("select#esami").html(scegli);
$("select#esami").attr("disabled", "disabled");
$("select#prenota").html(scegli);
$("select#prenota").attr("disabled", "disabled");
$("select#reparti").change(function(){
var reparto = $("select#reparti option:selected").attr('value');
$.post("php/select.php", {id_reparto:reparto}, function(data){
$("select#esami").removeAttr("disabled");
$("select#esami").html(data);
});
});
$("select#esami").change(function(){
$("select#prenota").attr("disabled", "disabled");
$("select#prenota").html(attendere);
var esame = $("select#esami option:selected").attr('value');
$.post("php/select.php", {id_esame:esami}, function(data){
$("select#prenota").removeAttr("disabled");
$("select#prenota").html(data);
});
});
$("form#select_form").submit(function(){
var reparto = $("select#reparti option:selected").attr('value');
var esame = $("select#esami option:selected").attr('value');
var data_p = $("select#prenota option:selected").attr('value');
});
</script>
<link rel="stylesheet" type="text/css" href="css/stylesheet.css" />
<style type="text/css">
ul {
list-style-type: none;
}
section fieldset {
background-color: #1461A1;
float: left;
width: 640px;
}
label, p {
color: white;
}
li {
margin-bottom: 10px;
}
.asterisk {
color: red;
}
label {
margin-right: 30px;
display: block;
}
section #submit {
height: 2em;
width: 4em;
margin-top: 20px;
}
</style>
</head>
<?php
include_once ($_SERVER['DOCUMENT_ROOT'] . '/php/select.php');
?>
<body onload=start()>
<header>
<fieldset>
<?php require($_SERVER['DOCUMENT_ROOT']. "/inc/users/account_opts.php"); ?>
</fieldset>
<div class=logo>
<img src="img/logo.jpg" alt="Ospedale" width="100" height="100" />
<div id=textbox>
<h1><span class="bigletter">O</span>spedale della<span class="bigletter"> m</span>urgia</h1>
<h3><span>“F. Perinei” </span></h3>
</div>
</div>
</header>
<nav class=menu>
<ul>
<li class="default" onclick="selection(this);"><a href="index.php">Home</a></li>
<li class="default" onclick="selection(this);"><a href="chisiamo.php">La struttura</a></li>
<li class="default" onclick="selection(this);"><a href="reparti.php">I nostri reparti</a></li>
<li class="default" onclick="selection(this);"><a href="prenotazioni.php">Prenotazioni</a></li>
<li class="default" onclick="selection(this)"><a href="contatti.php">Info e Contatti</a></li>
</ul>
</nav>
<div id=container>
<div id=content>
<section>
<h3>Prenota i tuoi esami!</h3>
E' possibile prenotare i tuoi esami on line. Bastano pochi click!
<p></p>
<fieldset>
<h2><label>Dati personali</label></h2>
<form action="php/prenota.php" method="post" id="select_form" >
<ul>
<li>
<label>Nome:</label>
<input name="nome" placeholder="nome" type="text" />
<span class="asterisk">*</span>
</li>
<li>
<label>Cognome:</label>
<input name="cognome" placeholder="cognome" type="text" />
<span class="asterisk">*</span>
</li>
<li>
<label>Codice fiscale:</label>
<input name="cod_fiscale" placeholder="codice fiscale" type="text" />
<span class="asterisk">*</span>
</li>
<li>
<label>Città:</label>
<input name="citta" placeholder="città" type="text" />
<span class="asterisk">*</span>
</li>
<p>
<label>Sesso</label>
<input type="radio" name="sesso" value="1"/>F<br/>
<input type="radio" name="sesso" value="2"/>M
</p>
</ul>
<h2><label>Dati impegnativa</label></h2>
<ul>
<li>
<label>Impegnativa:</label>
<input name="cod_impegnativa" placeholder="codice impegnativa" type="text" />
<span class="asterisk">*</span>
</li>
</ul>
<h2>
<label>Reparti ----> Esami ----> Date disponibili</label><br/>
</h2>
<label> Seleziona reparto</label><br/>
<select id="reparti">
<?php
echo $opt->MostraReparti();
?>
</select>
<label> Seleziona tipo esame</label><br/>
<select id="esami">
<option>Scegli..</option>
</select>
<label> Seleziona il giorno tra quelli disponibili</label><br/>
<select id="prenota">
<option>Scegli..</option>
</select>
<p><input type="submit" name="submit" value="Prenota"></p>
</form>
</fieldset>
</section>
</div>
</div>
</body>
Spero di aver rispettato le regole del forum e di essermi espressa in modo chiaro su quello che è il mio problema.
Grazie.