0) { echo "It appears you've already registered."; exit(); } $sql = mysql_query("insert into wdimdepot_users (username,fname,lname,email,password,startquarter) values ('$uname','$fname','$lname','$email','$pass','$start')"); $lastid = mysql_insert_id(); mkdir($lastid,0644); $encemail = base64_encode($email); $content = 'Thank you for signing up at wdimdepot.com. Please click the following link to activate your membership. Link'; mail($email,"Your Membership at wdimdepot",$content,"Content-type:text/html"); if ($sql) echo "Thank You, Please check your email to activate your membership!"; if (!$sql) echo mysql_error(); ?>