u have used the following code to get the submitted username:
$username=mysql_real_escape_string(trim($_POST['username']));
$sql = "select * from memberdetails WHERE username='$username'";
Here, i want u to note that u r fetching the value of the input type which has name='username', as the post method fetches values by name.
And u have assigned ur submit button with the name='username'.
that is the reason why u r not getting any values in the variable $username.
I would suggest u two methods.
One being, as Bonesnap suggested, switch the values of name attribute.
Or, you change ur php code and use:
$username=mysql_real_escape_string(trim($_POST['Submit']));
$sql = "select * from memberdetails WHERE username='$username'";
Also, it would b a lot easier for u to understand and write codes if u keep ur name and id attributes the same for each field.