이것은 나의 대본이다
<?php
define('HOST','databases.000webhost.com/localhost');
define('USER','id847165_user');
define('PASS','qwertyuiop');
define('DB','id847165_db');
$con = mysqli_connect(HOST,USER,PASS,DB);
$name = $_POST['name'];
$address = $_POST['address'];
$sql = "insert into Persons (name,address) values ('$name','$address')";
if(mysqli_query($con,$sql)){
echo 'success';
}
else{
echo 'failure';
}
mysqli_close($con);
?>
이건 내 실수 야
Warning: mysqli_connect(): (HY000/2002): Connection refused in /storage/h5/165/847165/public_html/db.php on line 6
Notice: Undefined index: name in /storage/h5/165/847165/public_html/db.php on line 8
Notice: Undefined index: address in /storage/h5/165/847165/public_html/db.php on line 9
Warning: mysqli_query() expects parameter 1 to be mysqli, boolean given in /storage/h5/165/847165/public_html/db.php on line 12
failure
Warning: mysqli_close() expects parameter 1 to be mysqli, boolean given in /storage/h5/165/847165/public_html/db.php on line 18
누구든지 내가 그것을 수정하도록 도울 수 있습니까?
이 기사는 인터넷에서 수집됩니다. 재 인쇄 할 때 출처를 알려주십시오.
침해가 발생한 경우 연락 주시기 바랍니다[email protected] 삭제
몇 마디 만하겠습니다