Scusate se creo un altro topic, ma nell'altro avevo fatto casino... ricapitolando:

Premettendo che di programmazione capisco ben poco, ho dei problemi con questo script, che è una bacheca.
Il problema è che quando provo a cancellare i messaggi, la procedura funziona solo col più vecchio e non con uno qualsiasi; in particolare, col messaggio vecchio (ID più basso), compare la schermata con la richiesta di autenticazione; con gli altri, non compare proprio nulla: schermata bianca.
A cosa è dovuto?

Vi ringrazio per la disponibilità.

Codice PHP:
if($qstr1 == "Delete") {
$link mysql_connect($host1$user1$pass1) or die("
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=indexe.php?act=Install\">
<title>Bacheca giovanotta</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Errore durante l'installazione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
mysql_select_db($data1) or die("
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2; url=javascript:history.back(1)\">
<title>Bacheca giovanotta</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Errore durante l'installazione dello script!

Assicurati di aver inserito i dati corretti.
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
$admin $_REQUEST["admin"];
$apass $_REQUEST["apass"];
$query1 mysql_query("SELECT * FROM bcsoft_gbook");
$query2 mysql_query("SELECT * FROM bcsoft_admin");
while(
$row1 mysql_fetch_array($query1)) {
while(
$row2 mysql_fetch_array($query2)) {
if(
$qstr2 == $row1[ID]) {
if((
$admin == $row2[Admin]) || ($apass == $row2[Pass])) {
$query3 "DELETE FROM bcsoft_gbook WHERE ID=$row1[ID]";
mysql_query($query3);
echo(
"
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<meta http-equiv=\"Refresh\" content=\"2 url=/home\">
<title>Bacheca giovanotta</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"40\" bgcolor=\"#ffff99\">
<div align=\"center\">
Messaggio cancellato con successo!
</div>
</td>
</tr>
</table>
</div>
</body>
</html>
"
);
} else {
echo(
"
<html>
<head>
<meta http-equiv=\"Content-Type\" content=\"text/html; charset=iso-8859-1\">
<meta name=\"author\" content=\"Boris Carollo - BCSoft\">
<meta name=\"description\" content=\"BCSoft Scripts - Guestbook V0.1\">
<meta name=\"keywords\" content=\"bcsoft, scripts, free, php, guestbook, mysql, scripting\">
<title>Bacheca giovanotta</title>
<style type=\"text/css\">
body {
font-family:Verdana;
font-size:10px;
}
table {
font-family:Verdana;
font-size:10px;
}
input {
font-family:Verdana;
font-size:10px;
}
textarea {
font-family:Verdana;
font-size:10px;
}
</style>
</head>
<body bgcolor=\"#ffffff\" link=\"#000000\" alink=\"#000000\" vlink=\"#000000\">
<div align=\"center\">
<form method=\"post\" action=\"indexe.php?act=Delete&cat=
$row1[ID]\">
<table bgcolor=\"#c8c8c8\" border=\"0\" cellspacing=\"1\" cellpadding=\"1\">
<tr>
<td width=\"500\" height=\"20\" bgcolor=\"#ffff99\" colspan=\"2\">
<div align=\"center\">
Autenticati
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Admin
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"admin\" size=\"30\" maxlength=\"12\">
</div>
</td>
</tr>
<tr>
<td width=\"150\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
Pass
</div>
</td>
<td width=\"350\" height=\"40\" bgcolor=\"#ffffff\">
<div align=\"center\">
<input type=\"text\" name=\"apass\" size=\"30\" maxlength=\"12\">
</div>
</td>
</tr>
</table>


<input type=\"submit\" value=\" Login \"> <input type=\"reset\" value=\" Cancella \">
</form>
</div>
</body>
</html>
"
);
}
}
}
}
mysql_close($link);