Ciao, sto impazzendo perche' non riesco a capire come mai non funziona il reperimento del cliente tramite SQL.

In pratica questa semplice pagina deve semplicemente fare un sql con lo username e la password e reperire il cliente associato, pero' non funziona e non so' perche'! Mi aiutate a capire dove sbaglio, Grazie

Posto la pagina

<html>

<?php
define("PAGE_TITLE", "Customer Update");
define("PHP_FILE_NAME", "srvrq1.php")
?>

<head>

<script language="javascript">
<!--
function checkForm()
{

if (document.action.customerCLSUSR.value==""){
alert("Username obbligatorio");
document.action.customerCLSUSR.focus();
return false;
}

if (document.action.customerCLSPSW.value==""){
alert("Password obbligatoria");
document.action.customerCLSPSW.focus();
return false;
}

if (document.action.customerCLSCLI.value==""){
alert("Cliente non registrato");
document.action.customerCLSUSR.focus();
return false;
}

}
//-->
</script>

<script language="Javascript">
function verificacaratteri(campo)
{
var chiffres = new RegExp("[a-z-A-Z-0-9,-?.\/*\r\n ]");
var verif;
var points = 0;

for(x = 0; x < campo.value.length; x++)
{
verif = chiffres.test(campo.value.charAt(x));
if(campo.value.charAt(x) == "."){points++;}
if(points > 1){verif = false; points = 1;}
if(verif == false){campo.value = campo.value.substr(0,x) + campo.value.substr(x+1,campo.value.length-x+1); x--;}
}
}
</script>

</head>

<body style="overflow:hidden;" bgcolor="#F7F7F7">

<?php
print( date("d M Y H:i:s", time()) );

/* Apertura connessione al database*/
include("connection.inc");

/* Testo se sono stati immessi Usr e Psw:
- Se non immessi pulisco variabile con cliente
- Se immessi reperisco il codice cliente associato alla usr e psw
*/

if ($customerCLSUSR=="" && $customerCLSUSR=="")

{$customerCLSCLI = "";}

else {

$sql = "select *
from ACSSI_DAT.CLSSI00F
WHERE CLSUSR = '".$customerCLSUSR."'
AND CLSPSW = '".$customerCLSPSW."' ";
$stmt = db2_exec($dbh, $sql, array('cursor' => DB2_SCROLLABLE));

$row = db2_fetch_array($stmt);

/* Ciclo di lettura dei dati estratti e stampa */
if (!$row=="") {

$customerCLSCLI = $row[7];

}
}

print '<form name="action" onsubmit="return checkForm();" action="srvrq2.php?
customerCLSCLI=' . $customerCLSCLI .'
" method="POST">';

print '<input type=hidden name="customerCLSCLI" value="'.$customerCLSCLI.'" />';
print 'Username <input type="text" size="10" maxlength="10" onkeyup=verificacaratteri(this);
name="customerCLSUSR" value="'.$customerCLSUSR.'"/>
';

print 'Password <input type="text" size="10" maxlength="10" onkeyup=verificacaratteri(this);
name="customerCLSPSW" value="'.$customerCLSPSW.'"/>
';

/*Stampo Sql e variabili per vedere se sono presenti
-------- NON SONO PRESENTI ANCHE SE NEL INPUT HO MESSO USR E PSQ!!----------*/
Print 'SQL='.$sql.'
';
Print 'CLI='.$customerCLSCLI.'
';
Print 'CLI='.$customerCLSUSR.'
';
Print 'CLI='.$customerCLSPSW.'
';

print '

';
?>

</td> <td>
<?php
print '<input type="submit" name="action" value="Aggiunta" /></form>';

print '<form action="db2_update4.php" method="POST">';
print '<input type="submit" name="close" value="Close " /></form>';

print '</form>';

?>


</body>
</html>