this a register script that i added email function to next i will add recovery question and recovery answer then i will post it =-p and it lets you make 5 accounts per ip address to change it to more just change >= 5 to how many you would like i have the other made already just gotta test it and see if it works long as your account tables has pwd this script will work just fine then. you will also need the attatchment
i just never seen register script here with email function so i made this
ohh and also i got vote reward script half made that can send vote reward item to your invetory =-p
i just never seen register script here with email function so i made this
ohh and also i got vote reward script half made that can send vote reward item to your invetory =-p
Code:
<?php
require_once './inc/class.captcha.php';
// Configurations
$myhost="localhost";
$mypass="****"; //your server login password
$myuser="****"; //your server login username
$mydbacc="account"; //your server account database
$mydbdata="my"; //your server my database name
$serveraddress="add your ip here"; //your server ip
$serverport=5816; //your server connection port
$mydb="my"; //your server my database
$servername = "elite pets online"; //Put your servername here.
$link = "your website here"; //Put your website link here
// Dont Edit after this
mysql_connect($myhost,$myuser,$mypass);
mysql_select_db($mydb);
?>
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Language" content="en-us">
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<script type="text/javascript" src="./inc/md5.js"></script>
<style type="text/css">
</style></head>
<DIV align="center"><b class="h2">
</b>
<br />
<table width="299" height="22" border="0" align="center">
<tr>
<form method="post" action="register.php?id=register">
<table align="center">
<tr><td>Login Id:</td></tr>
<tr><td><input type="text" name="id" ></td></tr>
<tr><td>Email:</td></tr>
<tr><td><input type="pwd" name="pwd"></td></tr>
<tr><td>Password:</td></tr>
<tr><td><input type="password" name="pass"></td></tr>
<tr><td>Retype Password:</td></tr>
<tr><td><input type="password" name="retpass"></td></tr>
<tr><td align="center">
<input type="hidden" name="hash"><input type="submit" onClick="hash.value = login(pass.value)" value="Register" name="reg">
</td></tr>
</table>
</form>
<?php
If($_POST['reg']){
mysql_select_db($myaccount);
$id = trim($_POST['id']);
$pwd = trim($_POST['pwd']);
$pass = trim($_POST['pass']);
$passretype=trim($_POST['retpass']);
$hash=$_POST['hash'];
$ip = $_SERVER['REMOTE_ADDR'];
$res = mysql_query("select * from account where netbar_ip = '".$ip."' order by id desc");
If(mysql_num_rows($res) == 0){
echo "Players are allowed only to have three accounts. ";
}else{
If(empty($id)){
echo "You left the Login Id blank, Its a required field";
}else{
If(empty($pass)){
echo "You left the password field blank, Its a required field";
}else{
If($pass != $passretype){
echo "Sorry your passwords do not match";
}else{
If(!ereg("^[0-9a-zA-Z]{4,12}$",$id)){
echo "Only letters or numbers, between 4 and 12 letters for a username";
}else{
If(!ereg("^[0-9a-zA-Z]{4,12}$",$pass)){
echo "Only letters or numbers, between 4 and 12 letters for a password";
}else{
$sql= mysql_query("select * from account where name = '".$id."' order by id desc");
If(mysql_num_rows($res) >= 5){
mysql_query("insert into account (name,pwd,Password,Reg_date,netbar_ip) values ('".$id."','".$pwd."','".$hash."','".date("y-m-d H:i:s", time())."','".$ip."')");
echo "Account created successfully. Please log into the game. ";
}else{
echo "Sorry that account is unavailable";
}//end seventh else
}//end sixth else
}//end fifth else
}//end fourth else
}//end third else
}//end second else
}//end first else
}//end post
?>