-1
공지 사항 : 정의되지 않은 인덱스 : C의 사용자 : \ WAMP \ WWW ---- \ testform.php 라인 (24)정의되지 않은 인덱스 : PHP
에 안녕 당신은 저를 도와주세요 수 있습니다. 텍스트 상자의 모든 이름을 변수로 선언하지 않았습니까?
$user = $_post['user'];
$number = $_post['number'];
$email = $_post['email'];
당신은 저를 시정 해주십시오.
<?php
$lhost = "localhost";
$user = "root";
$pss = "";
$dbn = "testarea";
$conn = mysqli_connect ($lhost,$user,$pss);
if (!$conn)
{
die("Connection Failed" .mysqli_connect_error());
}
$sdb = mysqli_select_db ($conn,$dbn);
if (!$sdb)
{
die("No Database" .mysqli_error());
}
$sqlii = "INSERT INTO person (name,contact,email) VALUES ('".$_POST['user']."','".$_POST['number']."','".$_POST['email']."')";
$sqliq = mysqli_query ($conn,$sqlii);
if (!$sqliq)
{
die("" .mysqli_error());
}
mysqli_close($conn);
?> `
<html>
<title>Test Area</title>
<body>
<form action="testform.php" method="post">
<input type="text" name="user"></br>
<input type="text" name="number"></br>
<input type="text" name="email">
<input type="submit" name="save" value="Save">
</form>
</body>
</html>
어떤 오류가 있습니까 ... 설명 –
양식을 제출할 때 사용자 입력란에 데이터를 전달 했습니까? –