假设 $connect 是链接:
$connect = new mysqli("localhost", "my_user", "my_password", "world");
尝试改变
$sql = mysqli_query($connect,"INSERT INTO testtable (fnhusband,fnwife,surname,email,address,suburb,city,postcode,region,number,altnumber)
VALUES ('$fnhusband','$fnwife','$surname','$email','$address','$suburb','$city','$postcode','$region','$number','$altnumber')");
$result = mysqli_query($connect,$sql);
到:
$sql = "INSERT INTO testtable (fnhusband,fnwife,surname,email,address,suburb,city,postcode,region,number,altnumber)
VALUES ('$fnhusband','$fnwife','$surname','$email','$address','$suburb','$city','$postcode','$region','$number','$altnumber')";
$result = $connect->query($sql);
或程序:
$sql = "INSERT INTO testtable (fnhusband,fnwife,surname,email,address,suburb,city,postcode,region,number,altnumber)
VALUES ('$fnhusband','$fnwife','$surname','$email','$address','$suburb','$city','$postcode','$region','$number','$altnumber')";
$result = mysqli_query($connect, $sql);