我无法提交表格[关闭]

I am working on a Training and placement site and I have a small problem but I am stuck..Hope I will be helped.. The code of login page is given below... This is tpr.php

<?php require_once("includes/tsession.php");?>
<?php require_once("includes/connection.php");?>
<?php require_once("includes/functions.php");?>
<?php

    if (isset($_POST['submit'])) 
    {
        $branch = trim(mysql_prep($_POST['branch']));
        $tprid = trim(mysql_prep($_POST['tprid']));
        $password = trim(mysql_prep($_POST['password']));

        $hashed_password = sha1($password);

        $query = "SELECT t.userID FROM tpr t,branch b WHERE    b.branch_ID=t.branch_id AND b.branch_name='{$branch}'     
        AND t.password = '{$hashed_password}' AND t.userID='{$tprid}' limit 1" or die(mysql_error());    
            $result_set = mysql_query($query);
            confirm_query($result_set);


            if (mysql_num_rows($result_set) == 1 ) {
                // username/password authenticated
                // and only 1 match

                echo "<script type='text/javascript'>alert('Username    /password/branch combination correct.');</script>";
                $found_user = mysql_fetch_array($result_set);



                $_SESSION['sessionid2']=$found_user['Userid'];
                redirect_to("tpr.php");
            } else {
                // username/password combo was not found in the database

                echo "<script type='text/javascript'>alert('Username/password/branch combination incorrect.');</script>";    
                $message = "Username/password/branch combination     incorrect.<br />    
            }
    }
    else{
    if(isset($_GET['logout']) && ($_GET['logout']==1) )
    {
        $message= "You are now logged out";
    }
    echo "<script type='text/javascript'>alert('out of submit');</script>";

    $tpoid="";
    $password="";
    }
?>
<?php include("includes/header.php"); ?>
<div id="main">
    <table id="structure">
    <tr>
    <td id="navigation">
    <a href="content.php">Return to Home</a>
    </td>
    <td id="page">
    <h2>Login</h2>
    <?php if (!empty($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
    <form action="tpr_login.php" method="post">
    <table id="inner" cellpadding="10">
    <tr>
    <td>Select Branch</td>
    <td>

 <?php

 $con = mysql_connect("localhost","TestUserFirst","TestUserFirst");
 $db = mysql_select_db("student",$con);
 $get=mysql_query("SELECT branch_name FROM branch ORDER BY branch_ID ASC");
$option = '';
 while($row = mysql_fetch_assoc($get))
{
  $option .= '<option value =      "'.$row['branch_name'].'">'.$row['branch_name'].'</option>';
}
?>
 <select name="branch" id="branch"> 
<?php echo $option; ?>
</select>
</td>
</tr>
    <tr>
    <td>TPRId</td>
    <td><input type=text name="tprid" id="tprid" value=""></td>
    </tr><tr>
    <td>Password</td>
    <td><input type=password name="password" id="password" value=""></td>
    </tr><tr>
    <td></td>
    <td><input type="submit" name="submit" value="Login"></td>
    </tr>
    </table>
    </td>
    </tr>
    </form>

    </table>
</div>
<?php require("includes/footer.php");?>

tsession contains session_start() AND session information..

<?php
session_start();
function tpr_logged_in()
{
return isset($_SESSION['sessionid2']);
}

function confirm_tpr_logged_in()
{ 
if(!tpr_logged_in())
{
    redirect_to("tpr_login.php");
}
}
?>

connection contains the database initialization...Problem is whenever I enter the right information It shows "Out of Submit" alert and if one information is wrong then it goes into the submit and returns password combination incorrect...obviously...What is the problem????

<div id="main">
    <table id="structure">
        <tr>
            <td id="navigation"><a href="content.php">Return to Home</a></td>
            <td id="page">
                <h2>Login</h2>


    <?php if (!empty($message)) {echo "<p class=\"message\">" . $message . "</p>";} ?>
    <form action="tpr_login.php" method="post">
    <table id="inner" cellpadding="10">
    <tr>
    <td>Select Branch</td>
    <td>

 <?php

 $con = mysql_connect("localhost","TestUserFirst","TestUserFirst");
 $db = mysql_select_db("student",$con);
 $get=mysql_query("SELECT branch_name FROM branch ORDER BY branch_ID ASC");
$option = '';
 while($row = mysql_fetch_assoc($get))
{
  $option .= '<option value =      "'.$row['branch_name'].'">'.$row['branch_name'].'</option>';
}
?>
 <select name="branch" id="branch"> 
<?php echo $option; ?>
</select>
</td>
</tr>
    <tr>
    <td>TPRId</td>
    <td><input type=text name="tprid" id="tprid" value=""></td>
    </tr><tr>
    <td>Password</td>
    <td><input type=password name="password" id="password" value=""></td>
    </tr><tr>
    <td></td>
    <td><input type="submit" name="submit" value="Login"></td>
    </tr>
    </table>
    </form>
    </td>
        </tr>
    </table>
</div>

End </form> tag after </table> instead of after </tr>.

I am not sure, but you can try this. Without checking its not possible to say the actual probelm.

there is a missing '";' in the line below

$message = "Username/password/branch combination incorrect.<br />";