Codice PHP:
require_once('db_login.php');
$connection = mysql_connect( $db_host, $db_username, $db_password );
if (!$connection)
{
die ("non e' stato possibile connettersi al database:
" . mysql_error());
}
$db_select=mysql_select_db($db_database);
if (!$db_select)
{
die ("non e' stato possibile connettersi al database:
" . mysql_error());
}
$query ="SELECT * FROM `utenti` WHERE `nome_utente` LIKE $name_r";
$result = mysql_query($query, $connection) or die('Errore 2');
$numrows = mysql_num_rows($result);
$resrow = mysql_fetch_row($result);
echo $resrow[0];
$query ="SELECT * FROM `utenti` WHERE `mail` LIKE $mail_r";
$result = mysql_query($query, $connection) or die('Errore 2');
$numrows = mysql_num_rows($result);
$resrow = mysql_fetch_row($result);
echo $resrow[2];
mi da errore 2