Advertisement
Guest User

Untitled

a guest
May 26th, 2017
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.58 KB | None | 0 0
  1. <?PHP
  2. // variabili di connessione
  3. // nome server, nome utente,
  4. // Password, nomedatabase, tabella
  5. $ServerName = "localhost";
  6. $UserName = "root";
  7. $Password = "madara";
  8. $DbName = "EP";
  9. $table="studente";
  10.  
  11. // la connessione al database e alla tabella
  12. $conn = mysql_connect($ServerName, $UserName, $Password) or die("CONNECTION NON RIUSCITA");
  13. mysql_select_db($DbName, $conn);
  14. /*$nome = $_GET["nome"];
  15. $cognome = $_GET["cognome"];
  16. $universita=$_GET['universita'];
  17. $username = $_GET["username"];
  18. $password = $_GET["password"];
  19. $conferma=$_GET['conferma'];
  20. $email = $_GET["email"];
  21. $universita = $_GET["universita"]; */
  22.  
  23.  
  24.  
  25. /* impostiamo la query e cerchiamo solo le amiche donne...*/
  26. //$sqlquery = "SELECT * FROM '".$table."' WHERE user_name = 'Daniloc87' ";
  27. $result = mysql_query("SELECT * FROM '".$table."' WHERE user_name = 'Daniloc87' ");
  28. /*$number = mysql_fetch_array($result);
  29.  
  30. $i = 0;
  31.  
  32. if ($number < 1) {
  33. print "<center><p>La ricerca non ha prodotto nessun risultato</p></center>";
  34. }
  35. else {*/
  36. while($row = mysql_fetch_array($result) ) {
  37. /*$thename = mysql_result($result,,"nome");
  38. $thecognome = mysql_result($result,$i,"cognome");
  39. $theuniversita = mysql_result($result,$i,"universita");
  40. $theemail = mysql_result($result,$i,"email");
  41. print "<p><b>Nome:</b> $thename<br><b>Cognome:</b> $thecognome<br><b>Universit&agrave:</b> $theuniversita<br><b>E-Mail:</b> $theemail</p>";
  42. $i++;*/
  43. print $row['nome'];
  44. print $row['cognome'];
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement