Parse error: syntax error, unexpected '{' 오류..

Parse error: syntax error, unexpected '{' 오류..

QA

Parse error: syntax error, unexpected '{' 오류..

본문


<?php
    if (isset($_POST['login-submit'])
        {
        include_once '../include/db.inc.php';
        $username = $_POST['userId'];
        $password = $_POST['userPw'];
        if (empty($username) || (empty($password))
         {
          header("Location: ../index.php?error=emptyfields");
          exit();
         }
        else 
         {
          $sql = "SELECT * FROM usertable WHERE userID=? OR userPW=?;"; 
          $stmt = mysqli_stmt_init($conn);    
          if (!mysqli_stmt_prepare($stmt , $sql))
          {
            header("Location: ../index.php?error=sqlerror");
            exit();
           }
         
        else
         {
            mysqli_stmt_bind_param($stmt, "ss" , $username , $password);
            mysqli_stmt_exectue($stmt);
            $result = mysqli_stmt_get_result($stmt);
            if ($row = mysqli_fetch_assoc())
            {
              $pwdCheck = password_verify($password, $row['userPW']);
              if ($pwdCheck == false)
              {
                header("Location: ../index.php?error=wrongpwd");
                exit();   
              }
                else if($pwdCheck == true)
                {
                session_start();
                $_SESSION['userNo'] = $row('userNO');
                $_SESSION['userId'] = $row('userID');
                header("Location: ../index.php?login=sucess");
                exit();     
                }
                else
                {
                    header("Location: ../index.php?error=wrongpwd");
                    exit(); 
                }
            }
            else
            {
             header("Location: ../index.php?error=nouser");
             exit(); 
            }
         }
         }
            }
            ?>

Parse error: syntax error, unexpected '{' in 3번 라인에  오류 같은데 ..어딘지 보이지가 않네용.ㅠ

이 질문에 댓글 쓰기 :

답변 3

 $sql "SELECT * FROM usertable WHERE userID=? OR userPW=?;"

 

여기도 이상하네요?

 

 $sql "SELECT * FROM usertable WHERE userID=? OR userPW=? "

답변을 작성하시기 전에 로그인 해주세요.
전체 123,122 | RSS
QA 내용 검색

회원로그인

(주)에스아이알소프트 / 대표:홍석명 / (06211) 서울특별시 강남구 역삼동 707-34 한신인터밸리24 서관 1404호 / E-Mail: admin@sir.kr
사업자등록번호: 217-81-36347 / 통신판매업신고번호:2014-서울강남-02098호 / 개인정보보호책임자:김민섭(minsup@sir.kr)
© SIRSOFT