<?php
require_once('db.php');
$nickname = $_POST['nickname'];
$password = $_POST['password'];
$sql = "INSERT INTO `nickname` (nickname ,password) VALUES('$nickname', '$password')";
if (empty ($nickname) || empty($password)){
    echo"complete all fields";
} else
{
    if($conn -> query($sql) === TRUE){
        echo "sucsess";
    } 
        else {
        echo "error". $conn -> error;
    }
};
$conn -> query($sql);


