questo script di login non inserisce i dati nella tabella "members"
ma non mi da nessun errore
Codice PHP:
<?
// This simple PHP / Mysql membership script was created by www.funkyvision.co.uk
// You are free to use this script at your own risk
// Please visit our website for more updates..
include_once"config.php";
if(isset($_POST['register'])){
$username = $_POST['username'];
$password = $_POST['password'];
$email = $_POST['email'];
$memip = $_SERVER['REMOTE_ADDR'];
$date = date("d-m-Y");
$avatar = $_POST['avatar'];
$yahoo = $_POST['yahoo'];
$msn = $_POST['msn'];
$moto = $_POST['moto'];
if($username == NULL OR $password == NULL OR $email == NULL OR $avatar == NULL OR $yahoo == NULL OR $msn == NULL OR $moto == NULL){
$final_report.= "Compilare tutti i campi..";
}else{
if(strlen($username) <= 3 || strlen($username) >= 30){
$final_report.="L' Username deve conprendere dai 3 i 30 caratteri..";
}else{
$check_members = mysql_query("SELECT * FROM `members` WHERE `username` = '$username'");
if(mysql_num_rows($check_members) != 0){
$final_report.="Username gia in uso!";
}else{
if(strlen($password) <= 6 || strlen($password) >= 12){
$final_report.="La Password deve conprendere dai 6 ai 12 caratteri..";
}else{
if(!eregi("^[_a-z0-9-]+(\.[_a-z0-9-]+)*@[a-z0-9-]+(\.[a-z0-9-]+)*(\.[a-z]{2,3})$", $email)){
$final_report.="La tua E-Mail non è valida..";
}else{
$create_member = mysql_query("INSERT INTO `members` (`id`,`username`, `password`, `email`, `ip`, `date`, `avatar`, `yahoo`, `msn`, `moto`)
VALUES('','$username','$password','$email','$memip','$date','$avatar','$yahoo','$msn','$moto')");
$final_report.="Grazie per esserti registrato,adesso puo Loggarti.";
}}}}}}
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Funky Vision Membership Script</title>
</head>
<body><form method="post">
<table width="450" border="1" align="center">
<? echo '<tr><td colspan="2">'.$final_report.'</td></tr>';?>
<tr>
<td width="50%">Username:</td>
<td width="50%"><label>
<input name="username" type="text" id="username" size="30" />
</label></td>
</tr>
<tr>
<td>Password:</td>
<td><input name="password" type="password" id="password" value="" size="30" /></td>
</tr>
<tr>
<td>Email:</td>
<td><input name="email" type="text" id="email" size="30" /></td>
</tr>
</td>
<tr>
<td width="50%">Avatar:<br>Url Immagine<br>100x100</td>
<td><input name="avatar" type="text" id="avatar" size="30" />
</td>
</tr>
<tr>
<td>Yahoo:</td>
<td><input name="yahoo" type="text" id="yahoo" size="30" /></td>
</tr>
</td>
<tr>
<td>Msn:</td>
<td><input name="msn" type="text" id="msn" size="30" /></td>
</tr>
</td>
<tr>
<td>Moto attuale:</td>
<td><input name="moto" type="text" id="moto" size="30" /></td>
</tr>
</td>
<td> </td>
<td><label>
<input name="register" type="submit" id="register" value="Register" />
</label></td>
</tr>
</table>
</form>
</body>
</html>