Ciao a tutti, vole sapere come gestire questa situazione, banale, ma io sto impoazzendo.
In pratica leggo un file e se e' presente la soluzione di un problema stampo la text area con la soluzione altrimenti non devo stampare la textarea.
Il problema e' che non riesco a farlo, ho provato tutti i test (== "", == '', != "", ecc..)
ma non riesco. Posto come reperisco questa variabile e come la uso, mi dite come
fare a gestire il tutto, trim test con apici, ecc... Grazie
La variabile che devo testare e' la $customerSRVSOL
REPERIMENTO
$sql = "select *
from ACSSI_DAT.srvrq00f
where
srvcli = '".$customerSRVCLI."'
and srvnum = '".$customerSRVNUM."'";
$stmt = db2_exec($dbh, $sql, array('cursor' => DB2_SCROLLABLE));
$row = db2_fetch_array($stmt);
if (!$row=="")
{
$customerSRVMOT = $row[20];
$customerSRVSOL = $row[22];
IMPOSTO SESSIONE
$_SESSION['customerSRVSOL'] = $customerSRVSOL;
RIMPOSTO VARIABILE SA SESSIONE (Non so perche' ho fatto questo passaggio in piu)
$customerSRVSOL = $_SESSION["customerSRVSOL"];
e da qua' dovrei testare il fatto che sia presente il testo nella variabile e se si stamparlo
if ($customerSRVSOL == "") {
print '<textarea readonly rows="4" cols="93">'.$customerSRVSOL.'</textarea>';?>
Non so perche' non va, ho provato il trim ecc, ma riesco!!!!