登録後にユーザーのアカウントをアクティブにするためのPHPの電子メールアクティベーションコードを作成しました。最初にアクティベーションリンクを再度クリックすると、誰でも助けてくれる、ありがとう!ここ は私のPHPコードです:最初のクリック後に電子メールメッセージのリンクを無効にする方法
$to = $email;
$subject = " Your Registration";
$message = "Welcome to our website!\r\rThanks for completing registration at www.example.com.
You can complete registration by clicking the following link:\rhttp://www.example.com/verify.php?$activationKey\r\rIf this is an error, ignore this email and you will be removed from our mailing list.\r\rRegards,\ www.example.com Team";
$headers = 'From: [email protected] example.com' . "\r\n" .
'Reply-To: [email protected] example.com' . "\r\n" .
'X-Mailer: PHP/' . phpversion();
mail($to, $subject, $message, $headers);
リクエストを検証するために一意の識別可能なフィールド値( 'key'、' activateid'など)が必要です。次に、アカウントがアクティブ化されたことを示す値を格納する必要があります。 .phpコードを使用して、まだ使用されていないことを確認します。 –