Location: PHPKode > projects > The Easy Dictionary Maker > sign_1_done.php
<?php

/*====================================================================================================
======================================================================================================
The Dictionary Maker (TDM) is released under the GNU General Public License (GPL), which is an 
	open-source license that means anyone is free to use, modify, and 
	redistribute it, with a few restrictions. That means that the following 
	text should be included as a comment at the top of every source file:

	========================================================================
	Copyright Daniel Herman 2002

	This file is part of TDM.

	TDM is free software; you can redistribute it and/or modify
	it under the terms of the GNU General Public License as published by
	the Free Software Foundation; either version 2 of the License, or
	(at your option) any later version.
	
	TDM is distributed in the hope that it will be useful,
	but WITHOUT ANY WARRANTY; without even the implied warranty of
	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
	GNU General Public License for more details.

	You should have received a copy of the GNU General Public License
	along with Beehive; if not, write to the Free Software
	Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  
	USA
	========================================================================
============================================================================================*/

require("./header2.php");

?>
<div align="top">
<img src="./sign_up.jpg">
</div>

<center><font face="<?php echo $style_font_face; ?>" color="<?php echo $colour_font;?>"><br><br>
<?php

$query = "SELECT * FROM $table_name_memb WHERE uname = '$form_uname'";
$result = mysql_query($query, $db) or die(mysql_error());
$numRows = mysql_num_rows($result);


for ($count = 0; $count < $numRows; $count++) {
  $resultArray = mysql_fetch_array($result);

$uname2 = $resultArray["uname"];

}

if($uname2 == $form_uname){
echo "Sorry, that username has already been taken please go <a href=\"javascript:history.back(1)\">back</a> to try another username.";
exit;
}

$query = "SELECT * FROM $table_name_memb WHERE uname = '$form_mail'";
$result = mysql_query($query, $db) or die(mysql_error());
$numRows = mysql_num_rows($result);


for ($count = 0; $count < $numRows; $count++) {
  $resultArray = mysql_fetch_array($result);

$mail2 = $resultArray["mail"];

}

if($mail2 == $form_mail){
echo "Sorry, that e-mail address has already been used. If you have forgoten your password or username please use the \"Forgot Password\" page on the login screen!";
}



$uname_hash = md5($form_uname);

$mail_hash = md5($form_mail);

$hash = $uname_hash.$mail_hash;

$query = "INSERT INTO $table_name_memb_temp (uname,mail,hash) VALUES ('$form_uname','$form_mail','$hash')";
$result = mysql_query($query, $db) or die(mysql_error());
$query = "SELECT * FROM $table_name_memb_temp WHERE hash = '$hash' AND uname = '$form_uname'";
$result = mysql_query($query, $db) or die(mysql_error());
$numRows = mysql_num_rows($result);
for ($count = 0; $count < $numRows; $count++) {
  $resultArray = mysql_fetch_array($result);
$mtid = $resultArray["mtid"];
}

$go = "$link/sign_do.php?hash=$hash&mtid=$mtid&uname=$form_uname";

$message = "$form_uname,\n\n Welcome to $dict_name. Click the following link to complete your signup proccess:\n
$go\n\n If the link is not clickable in your mail program, you may need to copy and paste it into your browser.";

mail("$form_mail", "$dict_name Membership", $message,
     "From: $admin_mail\r\n"
    ."Reply-To: $admin_mail\r\n");



?>
An e-mail has been sent to you in order to verify the address. Click on the link that is sent to you in order to complete your signup.
Return current item: The Easy Dictionary Maker