Well, there is a lot of things which could/should be changed. What is the problem you are having?
What I would change:
Retrieve the username first:
$username = html_special_chars($_GET['username']);
and use that in the query:
if(! $username ="")
{
mysql_query("SELECT id FROM shocc_users WHERE username = $username") or die('The query failed: '.mysql_error());
I would not do:
$_GET['id'] == $result;
But more:
$id = $result;
J.