//connect.php
<?php
$link=@mysqli_connect("localhost","root","") or die("Khong the ket noi den server");
mysqli_select_db($link,"webtintuc") or die ("Kiem tra lai ten database!");
mysqli_query($link,"set names 'utf8'");
?>
//dangky.php
<!doctype html>
<html>
<head>
<meta charset="utf-8">
<title>Untitled Document</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="xuly_dangky.php">
<p>
<label for="hoten">Họ tên:</label>
<input type="text" name="hoten" id="hoten">
</p>
<p>
<label for="diachi">Dia chi:</label>
<input type="text" name="diachi" id="diachi">
</p>
<p>
<label for="username">Username:</label>
<input type="text" name="username" id="username">
</p>
<p>
<label for="pass">Password:</label>
<input type="text" name="pass" id="pass">
</p>
<p>
<label for="email">Email:</label>
<input type="text" name="email" id="email">
</p>
<p>
<input type="submit" name="dangky" id="dangky" value="Đăng ký">
</p>
</form>
</body>
</html>