<!doctype html>
<html lang="tr">
<head>
<meta charset="UTF-8">
<meta name="viewport"
content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
</head>
<body>
<form action="kayitol.php" method="post">
<input type="text" name="username">
<input type="text" name="password">
<input type="submit" value="Kayıt ol">
</form>
<?php
$kullanici_adi = $_POST['username'];
$sifre = $_POST['password'];
$host = "localhost";
$user = "root";
$pass = "";
$db = "uyekayit";
$baglan = mysqli_connect($host,$user,$pass,$db);
if ($baglan->connect_errno>0){
echo "BAĞLANTI HATASI";
}else{
echo "baglantı başarılı";
}
$hashli_sifre = md5($sifre);
$sql = "INSERT INTO uyekayit(username, password) VALUES ('$kullanici_adi','$hashli_sifre')";
if ($baglan->query($sql)){
echo "Kayit Olundu";
}
?>
</body>
</html>