Php Form is not submitting the values
<p>Kindly check the code,where i am wrong in this.Form is not submitting the values.Page is refreshing but not posting the values.I don't know what is happening.Pls check the code and identify the mistake.i had also used this code on another application as well.it is working there but not here </p>

<pre><code>&lt;?php
    if ($username &amp;&amp; $userid) {
        echo "you are already logged in as $dbuser.&lt;a href='w-post.php'&gt; Click here to go to Post area&lt;/a&gt;";
    }

    else {
        $form = "&lt;form method=post action=123.php autocomplete=off enctype=multipart/form-data&gt;

    &lt;table width=759 border=1&gt;
        &lt;tr&gt;
            &lt;td width=749&gt;
                &lt;table width=756 border=1&gt;
                    &lt;tr&gt;
                        &lt;td colspan=3 bgcolor=#d9d9d9&gt;
                            &lt;div align=center class=style1&gt;&lt;font color=#003366&gt;PERSONAL INFORMATION&lt;/font&gt;&lt;/div&gt;
                        &lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td width=196&gt;
                            &lt;div class=label-text&gt;Email Address&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td width=297&gt;
                            &lt;div class=accountboxes&gt;&lt;input type=text class=accounttextboxes id=txtemail name=txtemail
                                                           size=50/&gt;
                            &lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td width=241&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td width=196&gt;
                            &lt;div class=label-text&gt;Password&lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td width=297&gt;
                            &lt;div class=accountboxes&gt;&lt;input type=password class=accounttextboxes id=txtpass name=txtpass
                                                           size=50/&gt;
                            &lt;/div&gt;
                        &lt;/td&gt;
                        &lt;td width=241&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                    &lt;tr&gt;
                        &lt;td width=196&gt;&lt;/td&gt;
                        &lt;td width=297&gt;&lt;input name=submit type=submit id=submit value=submit/&gt;

                        &lt;td width=241&gt;&amp;nbsp;&lt;/td&gt;
                    &lt;/tr&gt;
                &lt;/table&gt;
            &lt;/td&gt;
        &lt;/tr&gt;
    &lt;/table&gt;
    &lt;/td&gt;
    &lt;/tr&gt;
    &lt;/table&gt;
&lt;/form&gt;";

        if (isset($_POST['submit'])) {
            $user = $_POST['txtemail'];
            $pass = $_POST['txtpass'];
            if ($user) {
                if ($password) {
                    $password = md5($pass);
                    //echo $epassword;
                    $query   = mysql_query("SELECT * from users where email='$user'");
                    $numrows = mysql_num_rows($query);
                    if ($numrows == 1) {
                        $row      = mysql_fetch_assoc($query);
                        $id       = $row['id'];
                        $dbuser   = $row['name'];
                        $dbpass   = $row['password'];
                        $activate = $row['activation'];
                        if ($password == $dbpass) {
                            if ($activate == '1') {
                                $_SESSION['name']  = $dbuser;
                                $_SESSION['id']    = $id;
                                $_SESSION['email'] = $email;
                                header('location:forms.php');
                                exit();
                            }
                            else {
                                $error_account = 'Your Account is not activated yet';
                            }
                            echo $form;
                        }
                        else {
                            $error_pass = 'You entered an incorrect password';
                        }
                        echo $form;
                    }

                    else {
                        $error_email = 'Email Address not found';
                        echo $form;
                    }

                }

                else {
                    $enter_pass = 'Enter your password';
                    echo $form;
                }

            }
            else {
                $enter_email = 'Enter email address';
                echo $form;
            }

        }

        else {
            echo $form;
        }

    }
?&gt;
</code></pre>
