hi aint been around for a while .been working hard . so am getting back into things and want be able to let my users delete there own pics from gallery .
created a function in my core but cant get it to work . .
just need a few pointers
using this in the usergallery so only the user can see the delete X cross which dont work either lol .
prob be easier to add a line of code that lets the user see the delete cross on his/her pics only but my brain fried with working 70 hours a week lol
please help . ta
created a function in my core but cant get it to work . .
just need a few pointers
Code:
////////////////////////////////////////////delete own pic
function candelpic($uid,$mid)
{
$minfo = mysql_fetch_array(mysql_query("SELECT imageurl FROM ibwf_usergallery WHERE id='".$mid."'"));
if($minfo[0]==$uid)
{
return true;
}
if($minfo[1]==$uid)
{
return true;
}
return false;
}
Code:
if(candelpic($item[0]))
{
echo " / <a href=\"usergallery.php?action=del&sid=$sid&whoimage=$item[1]\">Del</a>";
}
please help . ta
Comment