<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[[AIUTO] Script che nn mi gira]]></title><description><![CDATA[<p dir="auto">Ciao</p>
<p dir="auto">Ho un DB dove sono registrate le coordinate per le foto degli utenti (nickname, nome foto, spazio foto ecc ecc)</p>
<p dir="auto">ora vorrei fare un controllo, ovvero se al nome della foto non corrisponde la foto, cancella la voce del db..</p>
<p dir="auto">ho provato a fare così (ho commentato la stringa di cancellazione per nn far casini fino a che lo script non è a posto)</p>
<pre><code class="language-php">$query=(mysql_query("select * from membri_spazio_foto order by id asc limit 10")); 
while ($d = mysql_fetch_array($query)) { 
$id = $d['id']; 
$nickname = $d['nickname']; 
$spazio_foto = $d['spazio_foto']; 
$nome_foto = $d['nome_foto']; 
$foto = "/foto_utenti/".$nome_foto; 

echo "&lt;img src=\"$foto\"&gt;"; 

$var= file_exists($foto); 
if ($var==false) { 
//$del = mysql_query("delete * from membri_spazio_foto where id = '$id'"); 
echo "fatto per ".$foto."&lt;br&gt;"; 
if ($spazio_foto == "1") { 
//$upp = mysql_query("update membri_iscrizioni set foto = 'no', hot = 'no' where nickname = '$nickname'"); 
echo "foto 1 per ".$foto."&lt;br&gt;"; 
} 
} 
}
</code></pre>
<p dir="auto">con echo "&lt;img src="$foto"&gt;"; mi esconono 8 foto mentre 2 non esistono, ma non capisco perchè nel ciclo if mi compaiono tutte e 10 gli echo (dovrebbero comparire solo i 2 inesistenti)</p>
<p dir="auto">qualcuno può aiutarmi?</p>
]]></description><link>https://dev.connect.gt/topic/39122/aiuto-script-che-nn-mi-gira</link><generator>RSS for Node</generator><lastBuildDate>Sat, 05 Dec 2026 17:26:59 GMT</lastBuildDate><atom:link href="https://dev.connect.gt/topic/39122.rss" rel="self" type="application/rss+xml"/><pubDate>Sun, 24 Jun 2007 12:18:06 GMT</pubDate><ttl>60</ttl></channel></rss>