Guest User

Untitled

a guest
Nov 30th, 2018
189
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.43 KB | None | 0 0
  1. <?php
  2. $username='Emanuele';
  3. $password='php';
  4. $database='database';
  5. $nome=$_POST['nome'];
  6. $cognome=$_POST['cognome'];
  7. $email=$_POST['email'];
  8. $eta=$_POST['eta'];
  9. mysql_connect('localhost',$username,$password);
  10. mysql_select_db($database)
  11. or die ('connessione non avvenuta al database');
  12. $query="INSERT INTO utenti VALUES ('','$nome','$cognome','$email','$eta') ";
  13. mysql_query($query) or die ('query non inserita');
  14. mysql_close();
  15. ?>
Add Comment
Please, Sign In to add comment