Salve gente sto crenado una chat per cellulari però pultroppo ho trovato dei errori.
Ho creato 2 script php quasi simili,uno mi da errore e l altro no.
Quello che mi da errore è questo:
Quello invece che non mi da errore è questo:codice:<? $login = mysql_real_escape_string($_POST ["login"]); $password = mysql_real_escape_string($_POST ["password"]); require ("connect_mysql.php"); $risultati_mysql = mysql_query( "SELECT * FROM utenti WHERE login='$login' AND password='$password'"); $num_righe=@mysql_num_rows($risultati_mysql); if ( $num_righe != 0 ) { echo (\" <html> <head> <title></title> <style type="text/css"> .style1 { color: #FFFFFF; } .style2 { color: #008000; } </style> </head><body><p align="center"><body bgcolor="#000000"> <span class="style1">Benvenuto in Thebestchat $login !!!</span> <p align="center"><p align="center"> <span class="style1">$login ecco il tuo Menù!!!</span> </p>1)Vai in messaggi Privati 2)ChatRoom 3)Regolamento 4)Modifica Profilo <div class="sec" align="center" style="height: 36px"> <hr style="height: -43px" /><a href="index.htm"> Slogga<hr style="height: -12px" /></a> </div> <p align="center" class="style2">Powered by Raziel </body> </html> "\); } else { print (" <html> <head></head> <body> <p align=\"center\">NON HAI LOGGATO RIPROVA</p> <p align=\"center\"><a href=\"index.html\">Vai al login</a></p> <p align=\"center\"><a href=\"nuovoutente.php\">registrati</a></p> </body> </hmtl> "); } mysql_close() ?>
Mi potete aiutare a risolvere i errori dello primo script??codice:<? #dati modulo $login = mysql_real_escape_string($_POST ["login"]); $password = mysql_real_escape_string($_POST ["password"]); #connetto a mysql require ("connect_mysql.php"); $risultati_mysql = mysql_query( "SELECT * FROM utenti WHERE login='$login' AND password='$password'"); #sopprime gli errori con @ $num_righe=@mysql_num_rows($risultati_mysql); if ( $num_righe != 0 ) { echo (\" <html> <head></head> <body> <p align=\"center\">Benvenuto $login</p> <p align=\"center\"><a href=\"msg_privati.php\">Vai in Messaggi Privati</a></p> <p align=\"center\"><a href=\"community/regolamento.html\">Regolamento</a></p> <p align=\"center\"><a href=\"msg_privati.php\">Chat-Room</a></p> <p align=\"center\"><a href=\"msg_privati.php\">Modifica profilo</a></p> <p align=\"center\"><a href=\"index.htm\">Logout</a></p> <p align=\"center\">Powered by Raziel</p> </body> </hmtl> "\); } else { echo (" <html> <head></head> <body> <p align=\"center\">NON HAI LOGGATO RIPROVA</p> <p align=\"center\"><a href=\"index.html\">Vai al login</a></p> <p align=\"center\"><a href=\"nuovoutente.php\">registrati</a></p> </body> </hmtl> "); } mysql_close() ?>
GRAZIE

Rispondi quotando