Before anyone else yells at you, and they will, you should never use your request (post/get) globals directly in the query.
You should be doing something like:
$name = '';
if($_POST['username']){
$username = mysql_real_escape_string($_POST['username']);
}
Ok, now that we have that out of the way, to perform the request you are asking you want to make a hyper link that passes the user name as a get variable back to your processing page.
So in the second file where you spit out the name, something like:
while($row = mysql_fetch_array($result))
{
echo "<tr>";
echo "<td><a href=\"insert.php?username=".$row['username']."\">" . $row['username'] . "<a/></td>";
echo "<td>" . $row['points'] . "</td>";
echo "</tr>";
}
echo "</table>";
What we are doing here is creating a hyper link on the username display that includes a get variable called 'username' and is passing hte user name value for that row.
When we click it, it should take us back to your processing page. We will need to update that logic to work with the $GET var instead of just $POST.
If we use the first example for escaping, it isn't that hard, just replace the $_POST['username'] with $user_name.
$name = '';
if($_POST['username']){
$username = mysql_real_escape_string($_POST['username']);
}elseif($_GET['username']){
$username = mysql_real_escape_string($_GET['username']);
}