This is the form for entering data
<html>
<head>
<title></title>
<meta charset="utf-8">
<link rel="stylesheet" href="style.css">
</head>
<body>
<form action="cadastrando.php" method="POST">
<input type="text" name="nome"><br><br>
<input type="text" name="idade"><br><br><br>
<input type="radio" name="sex" value="male"> Masculino
<br>
<input type="radio" name="sex" value="female"> Feminino<br>
<input type="text" name="email">
<input type="password" name="senha"><br><br>
<input type="text" name="peso"><br><br>
<input type="text" name="altura"><br>
<input type="text" name="qntd_exe">
<input type="submit" value="Cadastrar">
</form>
</body>
</html>
And here is the data reader with the command to insert the data
<?php
$link = mysqli_connect("localhost", "root", "", "tcc");
if (mysqli_connect_errno()) {
printf("Connect failed: %s\n", mysqli_connect_error());
exit();
}
?>
<html>
<head>
<title></title>
<meta charset="utf-8">
</head>
<body>
<?php
$nome = $_POST['nome'];
$idade = $_POST['idade'];
$email = $_POST['email'];
$senha = $_POST['senha'];
$peso = $_POST['peso'];
$altura = $_POST['altura'];
$imc = ($peso/($altura*$altura));
$qntd_exe = $_POST['qntd_exe'];
$sql = "INSERT INTO usuario VALUES ";
$sql .= "($nome', '$idade', '$email', '$senha', '$peso', '$altura', '$imc', '$qntd_exe', '$sexo')";
mysqli_query($link,$sql) or die("Erro ao tentar cadastrar registro");
mysqli_close($link);
echo "Cliente cadastrado com sucesso!";
?>
</body>
</html>
As much as I search and change several codes it does not appear error, but also does not insert the data in B.D