Registration Confirmation

0

I'm trying to send an email to validate a user's registration, this is my code.

    $id = mysql_insert_id($connect);

    // Criar as variaveis para validar o email
    $url =sprintf( 'id=%s&email=%s&uid=%s&key=%s',$id, md5($email), 
    md5($uid),md5($data_ts));


    $mensagem = 'Para confirmar seu cadastro acesse o link:'."\n";
    $mensagem .= sprintf('http://www.gomap.eco.br/ativar.php?%s',$url);

    $headers = "From:".$from;
    mail($to,$subject,$mensagem,$headers);

But when I put this part the email is not sent:      $ id = mysql_insert_id ($ connect);

What should I do?

    
asked by anonymous 22.06.2017 / 04:37

1 answer

0

The mysql extension is deprecated, instead use mysqli . For more details consult documentation

    
23.06.2017 / 16:52