[eluser]CroNiX[/eluser]
Look at the logic in this line:
Code:
if($query -> num_rows() == $userid)
So if the user ID is 234234 you will need to have that many rows returned in your query for it to trigger your code.
probably should be
Code:
if($query -> num_rows())
which means if you get ANY results, the subscription already exists.