mysqli_connect1 PHP Mysql연동을 위한 태그(mysqli_connect) mysqli_connect mysqli_connect(아이피, 아이디, 비밀번호, 데이터베이스명, 포트); 이전의 mysql함수를 개선한 것으로 mysqli 에서는 prepared statement 를 사용할 수 있다고 한다. 입력값에 대한 복잡한 제거나, 치환 작업 없이 SQL 인젝션 공격에 대한 방어를 할 수 있다고 합니다. if ($mysqli->connect_errno) { die('Connect Error: '.$mysqli->connect_error); } connect_errno 로 연결확인 가능하며, if ($result = $mysqli->query("select * from 테이블 where id='".$userId."' and password='".$userPw."'")){ while.. 2021. 10. 18. 이전 1 다음