Php Test kullanıcı kayıt doğrulama

0 Cevap php

Hey all, I am creating a login script that in one step, enters the new user into a text file, creates a new directory for that user, sends the user a code, and then the user has to enter the code to validate that he/she is real. First question is about the code that is emailed:

rastgele bir sayı oluşturulur ve yeni kullanıcıya gönderilir. Teoride yeni kullanıcı açık onun tarayıcı penceresi tutar, ve sayfanın içine kodunu girer. Bu olunca, o teslim tıklar. Ben kullanıcı o IF deyimini kullanarak e-posta alınan biri, hesabı oluştururken oluşturulan rasgele sayıyı karşılaştırma yapabilmek istiyorum.

$randNumber = rand();

<form id="form1" name="form1" method="post" action="">
 <span id="sprytextfield1">
   <label>Activation Code
     <input type="text" name="actcode" id="actcode" />
   </label>
   <span class="textfieldRequiredMsg">Please Enter Your activation Code To Continue.</span></span>
   <input name="Activate Account" type="submit" value="Activate Account" />

Something like: IF( $randNumber == 'actcode'){
redirect}
else{
     re-load}

Nasıl sayfa yük üzerine oluşturulan değişken "$ rand", o "hesabı etkinleştirmek" çarptığında kullanıcının girdiği ne karşılaştırmak yapabilirim?

Teşekkürler!

0 Cevap