ciao, sto preparando uno script per il login degli utenti.
Questo è il codice
<?
session_start ();
include "dati.php" ;
mysql_select_db($db_name, $db);
if ( $_GET[action]=="login")
{
$controllo = mysql_numrows (mysql_query("SELECT id FROM iscritti WHERE username='$_POST[username]' AND password='$_POST[password]'"));
if ( $controllo == "1" ) {
$loggato="si";
}
else
{ echo "Non sei loggato" ; $loggato="no"; }
session_register("loggato");
}
mysql_close();
?>
Questo è l'errore:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Le global sono su on...per cua non capisco il problema..
Questo è il codice
<?
session_start ();
include "dati.php" ;
mysql_select_db($db_name, $db);
if ( $_GET[action]=="login")
{
$controllo = mysql_numrows (mysql_query("SELECT id FROM iscritti WHERE username='$_POST[username]' AND password='$_POST[password]'"));
if ( $controllo == "1" ) {
$loggato="si";
}
else
{ echo "Non sei loggato" ; $loggato="no"; }
session_register("loggato");
}
mysql_close();
?>
Questo è l'errore:
Warning: Unknown: Your script possibly relies on a session side-effect which existed until PHP 4.2.3. Please be advised that the session extension does not consider global variables as a source of data, unless register_globals is enabled. You can disable this functionality and this warning by setting session.bug_compat_42 or session.bug_compat_warn to off, respectively. in Unknown on line 0
Le global sono su on...per cua non capisco il problema..