PageRenderTime 48ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/index.php

https://bitbucket.org/amorello/changeover
PHP | 42 lines | 27 code | 15 blank | 0 comment | 2 complexity | e3cca07e7d5ddbaacbf416d898161737 MD5 | raw file
  1. <?php
  2. include 'CSS/templateTop.html';
  3. require_once 'login.php';
  4. echo <<<_END
  5. <form action="home.php" method="post"><pre>
  6. UTENTE: <select name="utente" size="1">
  7. echo "<option value=\"a\"></option>";
  8. _END;
  9. $query = "SELECT ID, cognome, nome FROM utenti ORDER BY cognome ";
  10. $result = mysql_query($query);
  11. if (!$result) die ("Database access failed: " . mysql_error());
  12. $righe = mysql_num_rows($result);
  13. for ($j = 0 ; $j < $righe ; ++$j)
  14. {
  15. $row = mysql_fetch_row($result);
  16. $IDutente = $row[0];
  17. $cognomeutente = $row[1];
  18. $nomeutente = $row[2];
  19. echo "<option value=\"$IDutente\">$cognomeutente $nomeutente</option>";
  20. }
  21. echo <<<_END
  22. </select>
  23. Pwd: <input type="password" name="pwdinserita" /><br>
  24. <input type="submit" id="submit" name="entra" value="ENTRA" />
  25. _END;
  26. include 'CSS/templateEnd.html';
  27. ?>