Well it had both $aid and $id so that messed it up, and personally I like $id so I changed the $aid to match the other $id X3
This is the line with the exact error:
PHP Code:
$article_content = $article_content."<tr><td>".$aid."</td><td><a href='levelup.php?id=".$id."'>".$name."</a></td>
See how there's an $aid and an $id? But up top only one is specified.