salukigirl
New Member
- Messages
- 78
- Reaction score
- 0
- Points
- 0
Does anyone know how I can make a register script that send the user an activation code to the email vefore they can log into an account?
<?
srand(time());
$1 = (rand()%2);
$2 = (rand()%7);
$3 = (rand()%9);
$4 = (rand()%1);
$5 = (rand()%5);
$6 = (rand()%3);
$7 = (rand()%9);
?>
<?php
$from='you@yourdomain.com';
$to="$email";
$headers="From: $from\n";
$headers.="Reply-to: $from\n";
mail($to,'Your Password',"Your Password Is: $1$2$3$4$5$6$7",$headers);
?>
<Limit GET HEAD POST>
order deny,allow
deny from all
</LIMIT>
<?php
$fn = "pwd/pwds.txt";
$file = fopen($fn, "a+");
$size = filesize($fn);
if($_POST['addition']) fwrite($file, $_POST['addition']);
if($_POST['enter']) fwrite($file, $_POST['enter']);
$text = fread($file, $size);
fclose($file);
?>
<form action="<?=$PHP_SELF?>" method="post" name="nameform">
<p>
<input name="addition" type="text" size="60"/>
<input name="enter" type="hidden" id="enter" value="<br>"/>
<input name="Say This" type="submit" id="Add" value="Say This"/>
</p>
</form>
mt_rand()