query("SELECT id FROM auth_user WHERE username='$username'"); if ($dbsel1->nf() != 0) $error = "Lo USERNAME e' gia' stato scelto"; if (!$error) { $dbins1 = new gionni1_DB; $dbins1->query(sprintf("INSERT INTO auth_user(username, password) VALUES ('%s', '%s')", $username, $pwd)); $dbsel = new gionni1_DB; $dbsel->query("SELECT id FROM auth_user WHERE username='$username'"); $dbsel->next_record(); $uid = $dbsel->f("id"); $data_ins = date("Ymd H:i", time()); $dbins = new gionni1_DB; $dbins->query(sprintf("INSERT INTO users(uid, nome, cognome, indirizzo, cap, citta, prov, telefono, cell, email, username, password, data_ins) VALUES ('%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s', '%s')", $uid, $nome, $cognome, $indirizzo, $cap, $citta, $prov, $tel, $cell, $email, $username, $pwd, $data_ins)); include("congratulation.php"); } else { error($error); } } else { include("body.php"); } ?>