Codice PHP:
<?php
include_once 'collegamento.php';
$nome = $_GET['nome'];
$email = $_GET['email'];
$password = $_GET['password'];
$sql1 = $dbcon->query("SELECT * FROM hg WHERE email='$email'");
if(mysqli_num_rows($sql1) > 0) {
echo "email_erro";
} else {
//echo "vai continuar";
$sql2 = $dbcon->query("INSERT INTO hg(nome,email,password) VALUES('$nome','$email','$password')");
if($sql2) {
echo "register_ok";
} else {
echo "register_erro";
}
}
?>