1
나는 코드를 올바르게 작성했다고 생각하지 않습니다. 누군가 이것을 볼 수 있습니까? 나는 PHP에 처음이다! 여기에 몇 가지 예제에서 ISSET stackoverflow 코드의 오류
<?php
// Create Connection
$connect = mysqli_connect('localhost','root','test123','joomla');
// Check Connection
if(mysqli_connect_errno($connect)) {
echo 'Failed to connect to DataBase| '. mysqli_connect_error();
}
?>
나는 rp_id은 url 매개 변수에 존재하지 않는 경우에
if(issets($_GET['rp_id']))
추가 - 그것은 단지 당신이()는 isset에 오타가 같은
<?php
if(issets($_GET['rp_id]')) {
$rp_id = htmlspecialchars($_GET["rp_id"]);
// open record with evdet_id =$rp_id
$result = mysqli_query($connect,"SELECT * FROM n0dap_jevents_vevdetail WHERE evdet_id =".$rp_id);
while($row = mysqli_fetch_array($result)):
$value = $row['google_map'];
echo $value;
endwhile;
}
$connect->close();
//if the rp_id does exist the go ahead and run the top otherwise close it.
} else {
$connect->close();
}
?>
[SQL 주입 공격] (http://bobby-tables.com)에 취약합니다. htmlspecialchars는 ** 이에 대한 방어책이 아닙니다 **. –