hey guys i try to insert shout like in my ulkoi script......
so for that i
use this this table
table " c_like " and colum "likeid,shoutid,byuser,liketime,chk "
i put this condition if some one like any shout then chk = 1 insert and if dislike chk = 0
for showing shout like and dislke i use below code
my this code how i excute if some one like to show their unlike and if unlike show again like
$hasLiked=$db->get_row("SELECT * FROM c_like WHERE byuser='$uid' AND chk > 0 ");
if ($hasLiked!=1) {
help me for what condition i put in this like........... its ulkoi script....
so for that i
use this this table
table " c_like " and colum "likeid,shoutid,byuser,liketime,chk "
i put this condition if some one like any shout then chk = 1 insert and if dislike chk = 0
for showing shout like and dislke i use below code
PHP Code:
$hasLiked=$db->get_row("SELECT * FROM c_like WHERE byuser='$uid' AND chk > 0 ");
if ($hasLiked!=1) {
$like="<img src='".$config->url."images/like.png' /> <b style='color:red;'><a href='like1.php?act=add&sid=".$shout->shoutid."'>Like</a></b>"; } else {
$like="<img src='".$config->url."images/unlike.png' /> <a href='like1.php?act=add&sid=".$shout->shoutid."'>Unlike</a>"; }
$allshouts .= "<tr><td class=\"row1\">» <a href='profile.php?uid=".$shout->userid."'>".$usericon."<font color=\"".$group[$groupid]['color']."\">".$shout->username."</font></a> : ".$shout->message." ($mstime) <br/> $like</td></tr>";
}
print $allshouts;
unset($shoutlist);
unset($allshouts);
}
my this code how i excute if some one like to show their unlike and if unlike show again like
$hasLiked=$db->get_row("SELECT * FROM c_like WHERE byuser='$uid' AND chk > 0 ");
if ($hasLiked!=1) {
help me for what condition i put in this like........... its ulkoi script....
Comment