Не уверен, но, возможно, вам не хватает некоторых тегов </select>
. Может быть, попробовать что-то вроде:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="addlandac.php" method="post">
<label for="plotno">Plot no:</label>
<input type="text" name="plotno" id="plotno">
<label for="thramno">Thram No:</label>
<input type="text" name="thramno" id="thramno">
<label for="familyname">Name of family:</label>
<?php include("config_qc.php");
$query="SELECT * FROM familymember_tbl";
$result =mysqli_query($connect,$query);
$options="";
while ($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) {
$famid=$row["familyID"];
$nam=$row["name"];
$options.="<OPTION VALUE>".$nam.'-'.$famid.'</option>';
}
?>
<select name="family" id="family">
<option value="Select">Select family member</option>
<?=$options?>
</select>
<label for="dz">Dzonkhag:</label>
<?php include("config_qc.php");
$query="SELECT * FROM dzongkhag_tbl";
$result =mysqli_query($connect,$query);
$opt="";
while ($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) {
$dz_id=$row["dzID"];
$dzong=$row["dzname"];
$opt.="<OPTION VALUE>".$dzong.'-'.$dz_id.'</option>';
}
?>
<select name="dz" id="dz">
<option value="Select">Select Dzongkhag</option>
<?=$opt?>
</select>
<input type="submit" value="Submit">
</form>
<?php
echo "<BR>";
echo"<h4 align=left </h4>";
echo "<BR>";
echo "<a href='menu.php'>Bac to Main page</a>";
?>
</body>
</html>
или что-то вроде:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Add Record Form</title>
</head>
<body>
<form action="addlandac.php" method="post">
<label for="plotno">Plot no:</label>
<input type="text" name="plotno" id="plotno">
<label for="thramno">Thram No:</label>
<input type="text" name="thramno" id="thramno">
<label for="familyname">Name of family:</label>
<?php
include("config_qc.php");
$query="SELECT * FROM familymember_tbl";
$result =mysqli_query($connect,$query);
$options="";
while ($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) {
$famid=$row["familyID"];
$nam=$row["name"];
$options.="<option value="'.$nam.'-'.$famid.'">"'.$nam.'-'.$famid.'"</option>";
}
?>
<select name="family" id="family">
<option value="Select family member">Select family member</option>
<?=$options?>
</select>
<label for="dz">Dzonkhag:</label>
<?php
include("config_qc.php");
$query="SELECT * FROM dzongkhag_tbl";
$result =mysqli_query($connect,$query);
$opt="";
while ($row=mysqli_fetch_array($result,MYSQLI_ASSOC)) {
$dz_id=$row["dzID"];
$dzong=$row["dzname"];
$opt.="<option value="'.$dzong.'-'.$dz_id.'">"'.$dzong.'-'.$dz_id.'"</option>";
}
?>
<select name="dz" id="dz">
<option value="Select Dzongkhag">Select Dzongkhag</option>
<?=$opt?>
</select>
<input type="submit" value="Submit">
</form>
<?php echo "<br><h4 align=left </h4><br><a href='menu.php'>Back to main page</a>"; ?>
</body>
</html>