Good afternoon, I recently implemented an email confirmation system for the users that are registering and it works perfectly, but I want the users already registered to confirm, but when I tried to use the msm system I did not succeed ... alg Can you take a look?
<?php
$email = $_POST['email'];
$email2 = $_POST['email'];
$user = $_POST['user'];
$servidor = "localhost";
$usuario = "root";
$senha = "";
$dbname = "teste";
//Criar a conexao
$conn = mysqli_connect($servidor, $usuario, $senha, $dbname);
$result_leados = "INSERT INTO leados (email) VALUES ('$email')";
$resultado_leados = mysqli_query($conn, $result_leados);
$leado_id = mysqli_insert_id($conn);
$valor_chave = md5(date('Y-m-d H:i'));
$link = "http://localhost/Mail/baixar.php?chave=".$valor_chave;
$result_links_emaos = "INSERT INTO links_emaos (link, leado_id) VALUES ('$valor_chave', '$leado_id')";
$resultado_links_emaos = mysqli_query($conn, $result_links_emaos);