Ciao.
Ho un codice di autenticazione in php che punta al db sql.
Purtroppo mi viene sempre visualizzato un errore.
Chiedo un Vs. consulto in quanto non riesco a "cavarci i piedi".

Codice PHP:
<?php
$host
="127.0.0.1";
$user="root";
$password="QEuDmS2008";

mysql_connect($host,$user,$password);
mysql_select_db("siteminder");
 
if (isset(
$_POST['user']))
  {
  
$query_login="SELECT * FROM mylogin
                WHERE username = '"
.($_POST['user'])."'
                AND psw = '"
.MD5($_POST['pwd'])."'";
  
$rslt_login=$mysqlwrapper->Execute($query_login) or die("Errore di autenticazione. ");
 
  if (!
$rslt_login->EOF)
    {
    
// Esiste un record con questi username più(firma)password:
    // inserisco i dati nella sessione
    
session_start();
    
$_SESSION['Username']=$rslt_login->Fields('username');
    
$_SESSION['Usergroup']=$rslt_login->Fields('group');
    
header('location:main.php');
    }
   else 
header('location:login_failed.php');
  }
?>
 
<html>
<head>
<title>Esempio login</title>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
</head>
 
<body onLoad="document.form1.user.focus()">
<form name="form1" method="POST" action="index.php">
  <table border="0" cellspacing="0" cellpadding="0">
    <tr>
      <td>Nome utente: </td>
      <td><input name="user" type="text" id="user"></td>
    </tr>
    <tr>
      <td>Password: </td>
      <td><input name="pwd" type="password" id="pwd"></td>
    </tr>
    <tr>
      <td colspan="2"><input name="Submit" type="submit" value="Entra"></td>
    </tr>
  </table>
</form>
</body>
</html>
Lanciando questo script vengono correttamente visualizzati i due campi text e il bottone "entra".

Inserendo i dati, anche con valori non presenti sul db (user e password scorretti) viene visualizzato questo messaggio:

Fatal error: Call to a member function Execute() on a non-object in C:\xampp\htdocs\contim\index.php on line 14.

Chiedo un Vs. consulto.

Grazie.

Girl83