PHP网站调试[重复]

This question already has an answer here:

I have a question, when cannot run this programme, it shows

Parse error: syntax error, unexpected 'username' (T_STRING) in C:\xampp\htdocs\fypp\index.php on line 9

<?php
    session_start();
    if (isset($_POST['bttLogin'])){
        require 'connect.php';
        $username = $_POST['username'];
        $password = $_POST['password'];
        $result = mysquli_query($con, 'select * from account where username="'.$username.'" and password="'.$password.'")
        if(mysqli_num_rows($result)==1) {
            $_SESSION['username'] = $username;
            header("Location: welcome.php");
        }
        else
            echo "account is invalid";
    }
    ?>
    <form method="post">
    <table cellpadding="2" cellspacing="2" border="1">
        <tr>
            <td>Username</td>
            <td><input type="text" name="username"></td>
        </tr>
        <tr>
            <td>Password</td>
            <td><input type="password"" name="password"></td>
        </tr>
        <tr>
            <td>&nbsp;</td>
            <td><input type="submit" name="bttLogin" value="Login"></td>
        </tr>

thanks for answering :)

</div>

First of all, paste your code correctly... You are missing </table> and </form> in the end...

Second of all, you were missing a simple apostrophe and a semi-colon in the line

$result = mysquli_query($con, 'select * from account where username="'.$username.'" and password="'.$password.'")

Also, you should use mysqli_query instead of mysqlui_query... Typo!

Your code should be as follows :

<?php
session_start();
if (isset($_POST['bttLogin'])){
    require 'connect.php';
    $username = $_POST['username'];
    $password = $_POST['password'];
    $result = mysqli_query($con, 'select * from account where username="'.$username.'" and password="'.$password.'"');
    if(mysqli_num_rows($result)==1) {
        $_SESSION['username'] = $username;
        header("Location: welcome.php");
    }
    else
        echo "account is invalid";
}
?>

<form method="post">
<table cellpadding="2" cellspacing="2" border="1">
    <tr>
        <td>Username</td>
        <td><input type="text" name="username"></td>
    </tr>
    <tr>
        <td>Password</td>
        <td><input type="password"" name="password"></td>
    </tr>
    <tr>
        <td>&nbsp;</td>
        <td><input type="submit" name="bttLogin" value="Login"></td>
    </tr>
</table>
</form>

Change mysquli_query into mysqli_query, because it not a valid extension, and i think its typo error.

Modified Query:

$result = mysqli_query($con, "SELECT * FROM account 
                          WHERE username='" . $username . "' 
                          AND password ='". $password ."'");

Also note that, you missed the termination semi colon (;) on the same line.