codice:
<form name="login" action="index.php" method="post">
<table height="100%" align="center" cellpadding="0" cellspacing="0">
<tr valign="middle">
 <td>
   <table>
      <tr>
        <td width="100%" colspan="2" bgcolor="#ffffff" align="center" class="testo3">E.H.I Admin</td>
      </tr>
      <tr>
        <td align="right">
         Nome utente:
        </td> 
        <td><input type="text" name="nome" value="">
</td>
      </tr>
      <tr>
        <td align="right">Password:</td>
        <td><input type="text" name="psw" value=""></td>
      </tr>
	  <tr>
        <td align="center" colspan="2">
		<input type="hidden" name="challenge" value="si">
		
		<input type="submit" name="login" value="Login">
		
		</td>
      </tr>
   </table>
</td>
</tr>
</table>
</form>


include("config.php");
session_start();
if (isset($_POST['challenge'])) {
	$sessid=session_id();
	$_SESSION['sessid']=$sessid;
	$usermd=$_POST['nome'];
	//echo $usermd;
	$q="select * from utenti where user='$usermd'";
	$result=mysql_query($q) or die(mysql_error());
	if (mysql_num_rows($result)!=1) 
	  {
		//echo "cio";
		$failed=1;
	  }
	 else
	  {
	    $a=mysql_fetch_array($result) or die(mysql_error());
		$pass=md5($_POST['psw']);
		//echo $a['pass']."
".$pass;
		if(strcmp($a['pass'],$pass))
		 {
		       $login=$a["user"];
			   $_SESSION['login']=$login;
			   $failed=0;
		 }
		else $failed=1;
	  }
	  
}
il codice è giusto non vedo il prob...boh :master: