Ciao a tutti, alle prese con un errore che proprio non riesco a vedere !
Leggo la tabella che ha il codice del campo scelto, prelevo il codice del gestore
del campo per poi includere la funzione che mi estrae le date impegnate di quel campo.
Mi date una mano? leggendo le due righe di codice riuscite a capire perchè mi segnala questo errore :
Notice: Trying to get property of non-object in D:\EasyPHP-5.3.3\www\calcetto\cercagestore.php on line 38
Notice: Trying to get property of non-object in D:\EasyPHP-5.3.3\www\calcetto\cercagestore.php on line 39
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 righe 38 e 39 segnalate, le ho numerate nel codice che posto sotto.
Codice PHP:
$id_gestore='';
$nome_gestore ='';
$cognome_gestore='';
$id_campo=$_GET['id_campo'];
$id_campo = $_SESSION["id_campo"];
$data->connetti();
$commento_sql = $data->query("SELECT * FROM gestori where id_campo='$id_campo' order by id_gestore asc");
34 if(mysql_num_rows($commento_sql) > 0)
35 {
36 while($commento_obj = $data->estrai($commento_sql))
37 $id_gestore =$commento_obj->id_gestore ;
38 $nome_gestore = $commento_obj->nome;
39 $cognome_gestore = $commento_obj-> cognome;
40
41 }else{
42 // notifica in assenza di record
44 echo "Non trovate corrispondenze in campo :" .$id_campo." gestore :" .$id_gestore.".";
}
# variabili servono in grigliaore per estrarre le ore di impegno del campo
$_SESSION['nome_gestore'] = $nome_gestore;
$_SESSION['cognome_gestore'] = $cognome_gestore;
$_SESSION['id_gestore'] = $id_gestore;
include("grigliaore.php");
$data->disconnetti();
;
?>