ciao ragazzi...vi posto dei codici che ho fatto ultimamente ma non riesco a capire l'errore dove sia..

Codice PHP:
 if(candelw($uid$item[3]))
 {
 
$delnk "<a href=\"{$path}xxx.php?action=delfw&amp;mid=$item[3]\">[x]</a>";
 }else{
 
$delnk "";
 } 
nella pagina xxx.php c'è questo:

Codice PHP:
 if(candelw(getuid_sid($sid), $mid))
 {
 
$res mysql_query("DELETE FROM table_status WHERE id='".$mid."'");
 if(
$res)
 {
...
 }else{
...
 }
 }else{
....

e la funzione è:
Codice PHP:
function candelw($uid,$mid)
{
 
$minfo mysql_fetch_array(mysql_query("SELECT user FROM teble_status WHERE id='".$mid."'"));
 if(
$minfo[0]==$uid)
 {
 return 
true;
 }
 return 
false;

cosa potrei avere sbagliato??? help me