trektrak 0 Light Poster

Hello,

I need help on this, I know this is possible...I'm creating a time login page by entering a single code.. no username but just a code.... and so far I only can display the login members only directly called from sql table using php by using this code

<?php

$con = mysql_connect("localhost","root","");
if (!$con)
  {
  die('Could not connect: ' . mysql_error());
  }

mysql_select_db("log_time", $con);

$result = mysql_query("SELECT * FROM timelogin");

echo "<table border='1'>
<tr>
<th>code</th>
<th>time</th>
</tr>";

while($row = mysql_fetch_array($result))
  {
echo "<tr>";
echo "<td>".$row['code']."</td>";
echo "<td>".$row['time']."</td>";

echo "</tr>";
  }
  
echo "</table>";

mysql_close($con);
?>

What i need now.. everytime the user login code again... it will display logout...

ANyone with solution? Thanks guys... :$