"") {$ordineincorso = $_POST['ordineincorso'];} else {$ordineincorso =$_GET['oc'];} $colname_checkusername = "0"; if (isset($_POST['user'])) { $colname_checkusername = (get_magic_quotes_gpc()) ? $_POST['user'] : addslashes($_POST['user']); } mysql_select_db($database_bento, $bento); $query_checkusername = sprintf("SELECT * FROM utenti WHERE user = '%s' ", $colname_checkusername); $checkusername = mysql_query($query_checkusername, $bento) or die(mysql_error()); $row_checkusername = mysql_fetch_assoc($checkusername); $totalRows_checkusername = mysql_num_rows($checkusername); $colname_checkmail = "0"; if (isset($_POST['email'])) { $colname_checkmail = (get_magic_quotes_gpc()) ? $_POST['email'] : addslashes($_POST['email']); } mysql_select_db($database_bento, $bento); $query_checkmail = sprintf("SELECT * FROM utenti WHERE Email = '%s' ", $colname_checkmail); $checkmail= mysql_query($query_checkmail, $bento) or die(mysql_error()); $row_checkmail = mysql_fetch_assoc($checkmail); $totalRows_checkmail = mysql_num_rows($checkmail); function GetSQLValueString($theValue, $theType, $theDefinedValue = "", $theNotDefinedValue = "") { $theValue = (!get_magic_quotes_gpc()) ? addslashes($theValue) : $theValue; switch ($theType) { case "text": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "long": case "int": $theValue = ($theValue != "") ? intval($theValue) : "NULL"; break; case "double": $theValue = ($theValue != "") ? "'" . doubleval($theValue) . "'" : "NULL"; break; case "date": $theValue = ($theValue != "") ? "'" . $theValue . "'" : "NULL"; break; case "defined": $theValue = ($theValue != "") ? $theDefinedValue : $theNotDefinedValue; break; } return $theValue; } if (($totalRows_checkusername == 0) and ($totalRows_checkmail == 0)) { $editFormAction = $_SERVER['PHP_SELF']; if (isset($_SERVER['QUERY_STRING'])) { $editFormAction .= "?" . $_SERVER['QUERY_STRING']; } if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "modulo") && ($_POST["Submit"] == "registrati")) { $insertSQL = sprintf("INSERT INTO utenti (nome, cognome, telefono, email, indirizzo, cap, citta, cf_pi, `user`, pass) VALUES (%s, %s, %s, %s, %s, %s, %s, %s, %s, %s)", GetSQLValueString($_POST['nome'], "text"), GetSQLValueString($_POST['cognome'], "text"), GetSQLValueString($_POST['telefono'], "text"), GetSQLValueString($_POST['email'], "text"), GetSQLValueString($_POST['via'], "text"), GetSQLValueString($_POST['cap'], "text"), GetSQLValueString($_POST['comune'], "text"), GetSQLValueString($_POST['cfpi'], "text"), GetSQLValueString($_POST['user'], "text"), GetSQLValueString($_POST['pass'], "text")); mysql_select_db($database_bento, $bento); $Result1 = mysql_query($insertSQL, $bento) or die(mysql_error()); $maildestinatario=$_POST['email']; $nickname=$_POST['user']; $password=$_POST['pass']; require_once('senddata.php'); $insertGoTo = "cont_registrati_ok.php"; if ($ordineincorso == "1") {$insertGoTo = "cont_registrati_ok_ordine.php";} if (isset($_SERVER['QUERY_STRING'])) { $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?"; $insertGoTo .= $_SERVER['QUERY_STRING']; } header(sprintf("Location: %s", $insertGoTo)); } } // O LA MAIL O L'USERNAME GIA' ESISTE mysql_select_db($database_bento, $bento); $query_provincie = "SELECT * FROM province ORDER BY PROVINCIA ASC"; $provincie = mysql_query($query_provincie, $bento) or die(mysql_error()); $row_provincie = mysql_fetch_assoc($provincie); $totalRows_provincie = mysql_num_rows($provincie); $colname_comuni = "1"; if (isset($_POST['provincia'])) { $colname_comuni = (get_magic_quotes_gpc()) ? $_POST['provincia'] : addslashes($_POST['provincia']); } mysql_select_db($database_bento, $bento); $query_comuni = sprintf("SELECT * FROM comuni WHERE ID_PROVINCIA = %s ORDER BY COMUNE ASC", $colname_comuni); $comuni = mysql_query($query_comuni, $bento) or die(mysql_error()); $row_comuni = mysql_fetch_assoc($comuni); $totalRows_comuni = mysql_num_rows($comuni); ?> Documento senza titolo
Compila il form
Nome * Cognome *
Telefono * Email *
Indirizzo * Cap *
Provincia *    
Comune* *Campi obbligatori
0) { // Show if recordset not empty ?>
La user inserita non è disponibile perchè utilizzato da un altro utente
0) { // Show if recordset not empty ?>
l'indirizzo e-mail inserito risulta già utilizzato da un altro utente
Scegli la tua login e la tua password
User *
Pass*

Autorizzo BentoBar al trattamento dei dati come disciplinato dalla Legge sulla privacy 675/96