I have:
<label class="">
<input name="user_perfil" type="radio" value="administrador"> Administrador
</label>
<label class="">
<input name="user_perfil" type="radio" value="cliente"> Cliente
</label>
And in my database I have a column:
enum('administrador', 'cliente', 'suporte_tecnico')
I'm getting the POST that contains the value of the radio button:
$perfil = $_POST['user_perfil'];
And I'm calling a function:
function novoUsuario($conexao, $user, $password, $email, $nome, $perfil)
{
$query = "INSERT INTO usuarios (user_name, user_password_hash, user_email, user_fullname, rank)
VALUES ('{$user}', '{$user_password_hash}', '{$email}', '{$nome}', '{$perfil}')";
return mysqli_query($conexao, $query);
}
But my rank is not being saved in my bank. I'll use this rank to open specific pages for each value (adm, support, etc).
What am I doing wrong to my friends?