Codice PHP:
<?php
session_start();
require_once('mysqlconn.php');
mysql_select_db($database, $utenti);
$bSuccesso = true;
$username = $_GET['username'];
$code = $_GET['code'];
$sql = mysql_query("SELECT * FROM utenti WHERE username='".$username."' ") or die(mysql_error());
while ($row = mysql_fetch_array($sql)) {
if ($row['code'] == $code) {
$verDB = true;
$verifica = mysql_query("UPDATE utenti SET verifica = true WHERE username = '".$username."' ") or die (mysql_error());
?>
<html><head>
<script type="text/javascript">
function doRedirect() {
window.open(\index.php,\_top\);
}
window.setTimeout(doRedirect(), 15);
</script>
</head>
<body></body></html> <?php
}
}
?>