Giúp mình với sao mã này lại sai vậy
<meta charset="utf-8">
<title>Đăng Kí</title>
</head>
<body>
<?php
$servername='localhost';
$username='root';
$password='vertrigo';
$dbname="thanhvien";
$conn= new mysqli($servername,$username,$password,$dbname);
if($conn->connect_error)
die("ket noi khong thanh cong:").$conn->connect_error;
else echo "ket noi thanh cong";
$conn->query("set name utf-8");
//$sql="USE DATABASE thanhvien";
// create database
// $sql="CREATE DATABASE thanhvien";
// $conn->query($sql);
// if($conn->query($sql)===TRUE){
// echo "database create successfully";
// else echo "error creating database".$conn->error;
// }
// $conn->close();
// $sql="CREATE TABLE nghenghiep(
// MaNgheNghiep int(30) AUTO_INCREMENT PRIMARY KEY,
// TenNgheNghiep text not null
// )";
// $conn->query($sql);
// $create="CREATE TABLE taikhoan(
// TenDangNhap varchar(255) primary key,
// MatKhau text not null,
// HoTen text not null,
// DienThoai text not null,
// Email text not null,
// GioiTinh text not null,
// NgheNghiep INT(30) not null
// )";
// $conn->query($create);
// ALTER TABLE `taikhoan`
// ADD CONSTRAINT `taikhoan_nghenghiep` FOREIGN KEY (`NgheNghiep`) REFERENCES `nghenghiep` (`MaNgheNghiep`);
$truy_xuat_nghe_nghiep="SELECT TenNgheNghiep,MaNgheNghiep from nghenghiep";
$result=$conn->query($truy_xuat_nghe_nghiep);
?>
<h1>Dang ki thanh vien</h1>
<form method="post" action="<?php echo $_SERVER["PHP_SELF"]; ?>"></form>
<table>
<tr>
<td>Tên Đăng nhập:</td><td><input type="text" name="tendangnhap"></td>
</tr>
<tr>
<td>Mật Khẩu</td><td><input type="text" name="matkhau"></td>
</tr>
<tr>
<td>Họ Tên</td><td><input type="text" name="hoten"></td>
</tr>
<tr>
<td>Điện Thoại</td><td><input type="text" name="dienthoai"></td>
</tr>
<tr>
<td>Email</td><td><input type="text" name="email"></td>
</tr>
<tr>
<td>Giới Tính</td><td><input type="text" name="gioitinh"></td>
</tr>
<tr>
<td>Nghề Nghiệp</td><td>
<select name="nghenghiep">
<?php
while ($row=$result->fetch_assoc()) {
# code...
echo "<option value=".$row["MaNgheNghiep"].$row=["TenNgheNghiep"]."></option>";
}
?>
</select>
</td>
</tr>
<tr>
<td></td><td></td>
</tr>
</table>
</body>
</html>