Salve Gente.
Ho un problemino nel richiamare alcuni parametri.In pratica non mi richiama il parametro usern nell'eseguire il comando dell'SSH2.Avrà sbagliato qualche apice nella stringa
Codice PHP:
$comand "/usr/sbin/deluser" $usern "&& rm -rf /home/".$usern ."/"
Perchè nell echo alla fine funziona
Codice PHP:
echo $usern
Il codice completo è il seguente.Potreste dirmi cosa aggiustare?
Codice PHP:
        $conn_str mysql_connect(DBHOSTDBUSERDBPASS);
        
mysql_select_db(DBNAME$conn_str) or die ('Could not select Database.');
    
$query="SELECT * FROM ".DBTBLE." WHERE userid = $id"
$result mysql_query($query) or die(mysql_error());
while(
$row mysql_fetch_array($result)) 

$usern $row['username'];
$comand "/usr/sbin/deluser" $usern "&&  rm -rf /home/".$usern ."/";
$connection ssh2_connect('IPSERVER'22);
ssh2_auth_password($connection'root''PASSWORDSERVER');
$stream ssh2_exec($connection$comand);
if (!
$connection) die('Connection failed');
echo 
$usern;
 }