Código PHP:
if($found){
print "<script>alert(\"Nombre de usuario o email ya estan registrados.\");window.location='libro/registro.php';</script>";
}
$sql = "insert into user(username,fullname,email,password,created_at) value (\"$_POST[username]\",\"$_POST[fullname]\",\"$_POST[email]\",\"$_POST[password]\",NOW())";
$query = $con->query($sql);
if($query!=null){
print "<script>alert(\"Registro exitoso. Proceda a logearse\");window.location='/libro/login.php';</script>";