Newsgroup: it.comp.www.php
Titolo: Problema autenticazione Utente

Usando la funzione di ultradev per l'autenticazione dell'utente, mi viene
fuori questo errore e non capisco perche:
Warning: Undefined variable: Nickname in d:\campionato/TMP1241xh7qla.php on
line 16
Qui di seguito vi riporto il codice php che mi ha creato e che mi crea i
prblema
<?php
  //    Copyright (c) Interakt Online 2001
  //    
http://www.interakt.ro/
  require("./adodb/adodb.inc.php");
  require("./Connections/Campionato.php");
?>
<?php
// *** Start the session
session_start();
// *** Validate request to log in to this site.
$KT_LoginAction = $PHP_SELF;
if ($QUERY_STRING!="") $KT_LoginAction .= "?".$QUERY_STRING;
$KT_valUsername=$Nickname;
if (isset($KT_valUsername)) {
  $KT_fldUserAuthorization="";
  $KT_redirectLoginSuccess="Loginok.php";
  $KT_redirectLoginFailed="home.htm";
  $KT_rsUser_Source="SELECT Nickname, Password ";
  if ($KT_fldUserAuthorization != "") $KT_rsUser_Source .= "," .
$KT_fldUserAuthorization;
  $KT_rsUser_Source .= " FROM Inserimento WHERE Nickname='" .
$KT_valUsername . "' AND Password='" . $Password . "'";
  $KT_rsUser=$Campionato->Execute($KT_rsUser_Source) or
DIE($Campionato->ErrorMsg());
  if (!$KT_rsUser->EOF) {
    // username and password match - this is a valid user
    $KT_Username=$KT_valUsername;
    session_register("KT_Username");
    if ($KT_fldUserAuthorization != "") {
      $KT_UserAuthorization=$KT_rsUser->Fields($KT_fldUserAuthorization);
    } else {
      $KT_UserAuthorization="";
    }
    session_register("KT_UserAuthorization");
    if (isset($accessdenied) && false) {
      $KT_redirectLoginSuccess = $accessdenied;
    }
    $KT_rsUser->Close();
    session_register("KT_login_failed");
 $KT_login_failed = false;
    header ("Location: $KT_redirectLoginSuccess");
    exit;
  }
  $KT_rsUser->Close();
  session_register("KT_login_failed");
  $KT_login_failed = true;
  header ("Location: $KT_redirectLoginFailed");
  exit;
}
?>
<?php
$Recordset1__MMColParam = "Nickname";
if (isset($MM_EmptyValue))
  {$Recordset1__MMColParam = $MM_EmptyValue;}
?>
<?php
   $Recordset1=$Campionato->Execute("SELECT * FROM Inserimento WHERE
Nickname = '" . ($Recordset1__MMColParam) . "'") or
DIE($Campionato->ErrorMsg());
   $Recordset1_numRows=0;
   $Recordset1__totalRows=$Recordset1->RecordCount();
?>
<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<p>Login utente</p>
<form name="form1" method="post" action="<?php echo $KT_LoginAction?>">
  <p>
    <input type="text" name="Nickname">
  </p>
  <p>
    <input type="text" name="Password">
    <input type="submit" name="Submit" value="Invia">
  </p>
</form>
<p>&nbsp; </p>
</body>
</html>
<?php
  $Recordset1->Close();
?>

mah... passi la variabile Nickname dalla pagina precedente ?????
ciao
Frank

 ha scritto nel messaggio
news:9k0mpf$dqk$1...@fe1.cs.interbusiness.it...


 wrote in message
news:9k0n0r$oq6$1...@fe2.cs.interbusiness.it...

se vuoi usare una variabile in php hai 2 possibilita:
o gli hai dato un valore nella pagina corrente
o e' passata da una pagina precedente tramite form
senno la variabile nickname.. da dove la prende ???????
ciao
Frank