Forum Moderators: coopster
I have filesize default to 0 if nothing is put in. I have no idea what I am doing and after hackin' this for the better part of 3 days...I figured I better start asking for help...
$dbh=mysql_connect ("localhost", "un", "pw") or die ('I cannot connect to the database because: ' . mysql_error());
mysql_select_db ("rcracin_slips");
$query="select * from binary_data";
$rt=mysql_query($query);
echo mysql_error();while($nt=mysql_fetch_array($rt)){
if ($nt = 0 ) {
echo "$nt[filesize] <br /><br />";
}
else {
echo "nothing<br /><br />";
}
}
first of all
if ($nt = 0 )
i think that should be
if ($nt[filesize]=0)
second, in a Comparison statement, Double Equal signs should be coded, 1 = sign means assignment and 2 = signs mean comparison
so it should be
if ($nt[filesize]==0)
see if it works?
And welcome to WebmasterWorld, Riot_RCR :)