This is just the snippet of a page I am working on that I cannot get working properly.
[php]$favbands = mysql_query(“SELECT id,bandid,userid FROM favbands WHERE bandid=’$band[id]’ AND userid=’$userid’”);
if ((!$favbands[id])) { $faveband = “<a href=$baseURL/favband.pro.php?id=$band[id]&userid=$userid class=myButton>Add To Favorites”;}
else { $faveband = “<a href=$baseURL/unfavband.pro.php?id=$band[id]&userid=$userid class=myButton>Remove From Favorites”;}[/php]
I want it to show “Add To Favorites” when a user had not yet added it to their favorites. And show “Remove From Favorites” when they have already faved it. I know this should be a fairly simple thing to do, but it seems EVERYTHING I tried did not work. Thanks for the help in advance!