ciao ciao
user e password sono casuali e la mia tabella si chiama "email"(potrebbe causare dei problemi questo nome???)

codice:
<?php require_once('Connections/aprova.php'); ?>

<?php
include_once('szGenPass.inc.php');
    // Uso semplice, genera una password di 8 caratteri e la scrive a video
       $rand_pass = szGenPass::generatePassword(6);
  
	// Verifica che la validita' di una password
	if (szGenPass::validPass($my_pass))?>
	
	<?php
include_once('szGenuser.inc.php');
	// Uso semplice, genera una password di 8 caratteri e la scrive a video
       $rand_User = szGenPass::generatePassword(6);
  
	// Verifica che la validita' di una password
	if (szGenuser::validUser($my_User))?>
	
<?php
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;
}

$editFormAction = $_SERVER['PHP_SELF'];
if (isset($_SERVER['QUERY_STRING'])) {
  $editFormAction .= "?" . htmlentities($_SERVER['QUERY_STRING']);
}

if ((isset($_POST["MM_insert"])) && ($_POST["MM_insert"] == "form2")) 

{
  $insertSQL = sprintf("INSERT INTO email (email,username,password) VALUES (%s, %s, %s)",
                       GetSQLValueString($_POST['email'], "text"),
					   GetSQLValueString($rand_User, "text"),
					   GetSQLValueString($rand_pass, "text"));

 mysql_select_db($database_prova, $prova);
  $Result1 = mysql_query($insertSQL, $prova) or die(mysql_error());

  $insertGoTo = "pagina2.php";
  if (isset($_SERVER['QUERY_STRING'])) {
    $insertGoTo .= (strpos($insertGoTo, '?')) ? "&" : "?";
    $insertGoTo .= $_SERVER['QUERY_STRING'];
  }
  

  
 
  mail($_POST['email'], "parametri di connessione", sprintf( "Username e password per login in Pagina Sito: %s,%s",$rand_User, $rand_pass));
}
?>

<?php
SELECT %s, %s FROM email WHERE email = '$email' LIMIT 1;
?>
grazie grazie