Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title>login</title>
- </head>
- <body>
- <?php
- $host="";
- $user="";
- $pass="";
- $nomedb="";
- $conn=mysqli_connect($user,$pass,$host,$nomedb);
- ?>
- <form name="menu" action="ciao.php"method="POST">
- <table>
- <tr>
- <td><h3>Bambino</h3></td>
- <td><h4>Madre</h4></td>
- <td><h4>Padre</h4></td>
- </tr>
- <tr>
- <td>Cognome</td>
- <td>Cognome</td>
- <td>Cognome</td>
- </tr>
- <tr>
- <td><input type="text"name="cognome" id="cognome"/></td>
- <td><input type="text"name="cognomeM"/></td>
- <td><input type="text"name="cognomeP"/></td>
- </tr>
- <tr>
- <td>Nome</td>
- <td>Nome</td>
- <td>Nome</td>
- </tr>
- <tr>
- <td><input type="text"name="nome"/></td>
- <td><input type="text"name="nomeM"/></td>
- <td><input type="text"name="nomeP"/></td>
- </tr>
- <tr>
- <td>
- <select name= "anno" onchange="if (this.value) window.location.href=this.value">
- <option value="-1">Seleziona anno</option>
- <option value="?anno=0">1a elementare</option>
- <option value="?anno=1">2a elementare</option>
- <option value="?anno=2">3a elementare</option>
- <option value="?anno=3">4a elementare</option>
- <option value="?anno=4">5a elementare</option>
- <option value="?anno=5">1a media</option>
- <option value="?anno=6">2a media</option>
- <option value="?anno=7">3a media</option>
- </select></td>
- <td>Telefono</td>
- <td>Telefono</td>
- </tr>
- <tr>
- <td>Data di Nascita</td>
- <td><input type="text"name="telM"/></td>
- <td><input type="text"name="telP"/></td>
- </tr>
- <tr>
- <td>
- <!--<select name="giorno"><?php for($i=1;$i<32;$i++){echo "<option value= \"".$i."\">".$i."</option>";}?></select>
- <select name="mese"><?php for($i=1;$i<13;$i++){echo "<option value= \"".$i."\">".$i."</option>";}?></select>
- <select name="anno"><?php for($i=1970;$i<2031;$i++){echo "<option value= \"".$i."\">".$i."</option>";}?></select>
- -->
- <input type="date" name="data">
- </td>
- </tr>
- <tr><td>Luogo di Nascita:</td>
- <td>Gruppo:</td>
- </tr>
- <tr>
- <td><input type="text"name="luogoNascita" autocomplete="on"/></td>
- <td>
- <?php
- if(isset($_GET['anno']))
- {
- $cognome=$_POST['cognome'];
- echo $cognome;
- $anno=$_GET['anno'];
- $query="SELECT Coordinatore FROM gruppo WHERE anno=\"$anno\"";
- $ris=mysqli_query($conn,$query);
- $righe=mysqli_num_rows($ris);
- if($righe>0){
- echo "<select>";
- echo "<option value=\"-1\">Seleziona Catechista</option>";
- for($i=0;$i<$righe;$i++){
- $fetch=mysqli_fetch_row($ris);
- echo "<option value=\"$i\">$fetch[0]</option>";
- }
- echo "</select>";
- }else{
- echo "Nessun gruppo presente<br> di questo anno!";
- }
- }
- else {
- echo "Selezionare Anno";
- }
- ?>
- </td>
- </tr>
- </table>
- <input type="submit" value="Fatto"/><input type="reset"/>
- </form>
- <br>
- <?php
- }
- ?>
- </body>
- </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement