PEAK XOOPS - know if photo is already voted by user in englishin japanese

know if photo is already voted by user

List posts in the topic

question know if photo is already voted by user

msg# 1
depth:
0
Previous post - Next post | Parent - Children.1 | Posted on 2006/8/20 18:46
slyss79  三等軍曹   Posts: 143
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
Votes:0 Average:0.00

Posts tree

  Advanced search


Login
Username or e-mail:

Password:

Remember Me

Lost Password?

Register now!