Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $host="localhost"; // Hostname
- $username="maimar96x"; // Mysql username
- $password=""; // Mysql password
- $db_name="my_maimar96x"; //Nome del Database
- $tbl_name="members"; // Nome della Tabella
- $db = mysql_connect($localhost,$username,$password);
- mysql_select_db($db_name,$db);
- $username = $_POST['username'];
- $password = $_POST['password'];
- $nome = $_POST['nome'];
- $cognome = $_POST['cognome'];
- $email = $_POST['email'];
- $permessi = "Utente";
- //if (!ereg ("@", $email)){
- // echo '<h3>Errore!</h3><br>Deve inserire una email valida<br>
- // La preghiamo di <a href="registrazione.html">tornare indietro e correggere</a>. Grazie';
- // exit;
- // };
- mysql_query("INSERT INTO ".$tbl_name." (username,password,nome,cognome,email,Permessi) VALUES ('$username','$password','$nome','$cognome','$email','$permessi')",$db) || die(mysql_error());
- /* quindi i dati sono stati salvati nel database e l'utente รจ registrato */
- mysql_close($db);
- header("location:reg_ok.html");
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement