-2
Parse error: syntax error, unexpected T_CONSTANT_ENCAPSED_STRING in C:\xampp\htdocs\PP\login.php on line 5
<?php
$connect = mysql_connect("localhost","root","") or die("cannot connect");
extract($_POST);
$query = "select * from user where username='".$userp."' and password='".$pwd."'";
$res = mysql_query($query,$connect) or die(mysql_error() . "Query FAIL.");
$exist = mysql_num_rows($res);
if($exist == 1)
header("Location: user.php);
?>
이 실패에 대한 좋은 점이 하나 있습니다. 코드를 실행하지 않지만 SQL 주입 공격에 취약하지 않습니다 ... –