hi everyone
i need to know if user have already voted a photo (by the lid)
in viewcat.php i have insert this:
$uid = $xoopsUser->getVar('uid');
$sql = "SELECT ratingid ";
$sql.= " FROM ".$xoopsDB->prefix('myalbum3_votedata');
$sql.= " WHERE ratinguser = '$uid'";
$sql.= " AND lid = '$lid'";
$rs = $xoopsDB->query($sql) or die($xoopsDB->error());
if($xoopsDB->getRowsNum($rs)>0){
//voted
}else{
//not voted
}
but it dosn't work because $lid is not valid.... but if i open my viewcat.php?cid=4 the variable $lid is valid!!!!
can you help me to know in viewcat.php if (for ex.) photo.php?lid=19 if already voted by this user....
http://img301.imageshack.us/img301/4793/immagine1gt2.jpg
i have solved it...
the thread for the solution is
herebyee