login authentification token php .. stuck
<p>When the user registers an account, a table is created with columns; userid and token.  This is because if the user checks remember me when logging in on different computers, each computer has a different token.</p>

<p>register.php </p>

<pre><code>//user specific table created    
$create = $connectdb-&gt;prepare("CREATE TABLE `user-:username` (userid INT, token varchar(200)");
                        $executequery = $create-&gt;execute(array("username"=&gt;$username)); 
</code></pre>

<p>Here is a snippet of login.php; I create the token, store the token in a cookie and insert the token to that user specific table</p>

<pre><code>  if($remember==1) {
                            $token = md5(uniqid('',true));
                            setcookie('token',$token,time()+60*60*24*365);

                            $rememberquery = $connectdb-&gt;prepare("INSERT INTO `user-:username` VALUES ('',:username,:token)");
                            $rememberquery-&gt;execute(array(":username"=&gt;$username,":token"=&gt;$token));
$_SESSION['username'][0] = $username;       
$_SESSION['username'][1] = $userid;                 
                            }
</code></pre>

<p>Now i'm stuck(assuming i have done the previous correctly). When/How do i check the cookie token to the database token?</p>
