PHP / MySQL表更新问题

I have a MySQL Database setup with a bunch of usernames, passwords, and other details. I have one "administrator" section on the site that I want to be able to edit the users information when needed.

So far I have a page called president_admin.php (code below), which displays a table with the name, username, and password of the user, as well as a link to update the user. I have the table working correctly, it displays the information and all. The update link, takes the users ID in the table, then sends it to a page called StudentEdit.php (code below) which then retrieves the ID of the User, and fills three text fields with the username, password, and name just fine. It works.

So I fill out the fields to test and see if it will let me update the variables in the database, and press submit which goes to a page called StudentUpdate.php (code below). The page connects to the database, and uses and if to display and error if it will not update. It goes through fine and says it successfully update.... But it indeed does not. Can someone look at my code and help me out.

I've been stuck on this for hours. Please Note this is a code snip, its actually secured and has more to the page. Also I'm a teen trying my best here... Sorry if this is scrutiny to the coding world.

president_admin.php

<?php
                    session_start(); 
                    $host="localhost"; // Host name 
                    $username=""; // Mysql username 
                    $password=""; // Mysql password 
                    $db_name=""; // Database name 
                    $tbl_name="members"; // Table name

                    // Connect to server and select databse.
                    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
                    mysql_select_db("$db_name")or die("cannot select DB");

                    $sql="SELECT * FROM $tbl_name";
                    $result=mysql_query($sql);                  
?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
                <tr>
                    <td>
                        <table width="100%" border="1" cellspacing="0" cellpadding="3">

                            <tr>
                            <td align="center"><strong>Name</strong></td>
                            <td align="center"><strong>Username</strong></td>
                            <td align="center"><strong>Password</strong></td>
                            <td align="center"><strong>Update</strong></td>
                            </tr>

                            <?php
                            while($rows=mysql_fetch_array($result)){
                            ?>

                            <tr>
                            <td><? echo $rows['name']; ?></td>
                            <td><? echo $rows['username']; ?></td>
                            <td><? echo $rows['password']; ?></td>

                            <td align="center"><a href="StudentEdit.php?id=<? echo $rows['id']; ?>">Update</a></td>
                            </tr>

                            <?php
                            }
                            ?>
                            <?php
mysql_close();
?>

                        </table>
                    </td>
                </tr>
            </table>

StudentEdit.php

<?php
                    session_start(); 
                    $host="localhost"; // Host name 
                    $username=""; // Mysql username 
                    $password=""; // Mysql password 
                    $db_name=""; // Database name 
                    $tbl_name="members"; // Table name

                    // Connect to server and select databse.
                    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
                    mysql_select_db("$db_name")or die("cannot select DB");
                    // get value of id that sent from address bar
                    $id=$_GET['id'];

                    // Retrieve data from database 
                    $sql="SELECT * FROM $tbl_name WHERE id='$id'";
                    $result=mysql_query($sql);
                    $rows=mysql_fetch_array($result);
?>
<table width="100%" border="0" cellspacing="1" cellpadding="0">
                <tr>
                <form name="form1" method="post" action="StudentUpdate.php">
                <td>
                <table width="100%" border="0" cellspacing="1" cellpadding="0">
                <tr>
                <td>&nbsp;</td>
                </tr>
                <tr>
                <td align="center">&nbsp;</td>
                <td align="center">&nbsp;</td>
                <td align="center">&nbsp;</td>
                <td align="center">&nbsp;</td>
                </tr>
                <tr>
                <td align="center">&nbsp;</td>
                <td align="center"><strong>Name</strong></td>
                <td align="center"><strong>Username</strong></td>
                <td align="center"><strong>Password</strong></td>
                </tr>
                <tr>
                <td>&nbsp;</td>
                <td align="center">
                <input name="name" type="text" id="name" value="<? echo $rows['name']; ?>">
                </td>
                <td align="center">
                <input name="username" type="text" id="username" value="<? echo $rows['username']; ?>" size="15">
                </td>
                <td>
                <input name="password" type="text" id="password" value="<? echo $rows['password']; ?>" size="15">
                </td>
                </tr>
                <tr>
                <td>&nbsp;</td>
                <td>
                <input name="id" type="hidden" id="id" value="<? echo $rows['id']; ?>">
                </td>
                <td align="center">
                <input type="submit" name="Submit" value="Submit">
                </td>
                <td>&nbsp;</td>
                </tr>
                </table>
                </td>
                </form>
                </tr>
                </table><?php
// close connection 
mysql_close();
?>

StudentUpdate.php

<?php
                    session_start(); 
                    $host="localhost"; // Host name 
                    $username=""; // Mysql username 
                    $password=""; // Mysql password 
                    $db_name=""; // Database name 
                    $tbl_name="members"; // Table name

                    // Connect to server and select databse.
                    mysql_connect("$host", "$username", "$password")or die("cannot connect"); 
                    mysql_select_db("$db_name")or die("cannot select DB");

                    // update data in mysql database 
                    $sql="UPDATE members SET name='$name', username='$username', password='$password' WHERE id='$id'";
                    $result=mysql_query($sql);

                    // if successfully updated. 
                    if($result){
                    echo "Successfully Updated";
                    echo "<BR>";
                    echo "<a href='president_admin.php'>Return to dashboard</a>";
                    }

                    else {
                    echo "Error, something went wrong.";
                    }
?>
add this to your studentupdate.php
if($_POST['Submit']))
{
$name=$_POST['name'];
$username=$_POST['username'];
$password=$_POST['password'];
$id=$_POST['id'];
//your script
}
and also change the variable name in connection script
$username=""; // Mysql username 
$password="";