ErrorException [解析错误]:语法错误,意外' $密码' (T_VARIABLE)

时间:2013-05-26 06:46:00

标签: php parsing

    //If the user has submitted the form
    if (!isset($_POST['Submit']) || ($_POST['Submit'] != 'Register')){
        //protect the posted value then store them to variables
        $username=($_POST['username'])
        $password=($_POST['password'])
        //Check if the username or password boxes were not filled in

我似乎无法解决我遇到的这个错误? ErrorException [解析错误]:语法错误,意外'$ password'(T_VARIABLE)

2 个答案:

答案 0 :(得分:1)

分配后您缺少分号

    $username=($_POST['username']);
    $password=($_POST['password']);

答案 1 :(得分:1)

试试这个

//If the user has submitted the form
    if (!isset($_POST['Submit']) && ($_POST['Submit'] != 'Register')){
        //protect the posted value then store them to variables
        $username=($_POST['username']);
        $password=($_POST['password']);
        //Check if the username or password boxes were not filled in