Register for your free account! | Forgot your password?

Go Back   elitepvpers > MMORPGs > Eudemons Online > EO PServer Hosting > EO PServer Guides & Releases
You last visited: Today at 17:26

  • Please register to post and access all features, it's quick, easy and FREE!

Advertisement



Release Register script with email function

Discussion on Release Register script with email function within the EO PServer Guides & Releases forum part of the EO PServer Hosting category.

Reply
 
Old   #1
 
elite*gold: 0
Join Date: Oct 2010
Posts: 8
Received Thanks: 9
Release Register script with email function

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


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. &nbsp;";
}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
?>
Attached Files
File Type: zip inc.zip (350.5 KB, 55 views)
Elite Pets is offline  
Thanks
2 Users
Old 10/08/2010, 14:05   #2
 
~Sword~Stalker~.'s Avatar
 
elite*gold: 0
Join Date: Dec 2009
Posts: 1,784
Received Thanks: 1,056
not a big deal or a hard thing to do but nice :P
~Sword~Stalker~. is offline  
Old 10/08/2010, 17:04   #3
 
Eurion's Avatar
 
elite*gold: 0
Join Date: Oct 2009
Posts: 1,208
Received Thanks: 926
Sorry this is one of the worst copy and edits I've ever seen.


Lets break down your errors

Fist Error: You are using a form POST with a form GET

Second error: The php codes you have are taken from multiple releases and just combined. This is a bad habit as you don't learn anything. You have way too many typical if/else statements, use google and look up if/elseif. It will save you alot of lines of code in the long run.


Third error: Your email script isn't even an email check. All it does is take a user inputted message and puts it into the database. So it will take anything from a user. examples would be, I enter none, nothing, blank it will accept all of those as being valid.


There are many other issues with this code, but that's all ill give info on.

Suggestion: Anyone who uses this, beware of the flaws.


To the original poster:

Lesson of the day, if you're going to release codes at least make sure you understand what you're doing.
Eurion is offline  
Thanks
2 Users
Old 10/08/2010, 20:54   #4
 
.Ash's Avatar
 
elite*gold: 0
Join Date: May 2009
Posts: 1,175
Received Thanks: 540
Quote:
Originally Posted by Eurion View Post
This is a bad habit as you don't learn anything. You have way too many typical if/else statements, use google and look up if/elseif. It will save you alot of lines of code in the long run.
Agrees you with 100%.


Stay away from Goto's lol there dangerous..
.Ash is offline  
Reply


Similar Threads Similar Threads
[RELEASE] Register Script (with anti SQL inject)
07/16/2014 - Dekaron Private Server - 19 Replies
Register script with Anti SQL inject, no ODBC ! DO NOT USE THIS SCRIPT! Have fun :)
[Help] Register.php That ask for Email
04/19/2010 - EO PServer Hosting - 8 Replies
I would like my register page to ask for the person's email. That way if I need to reset their password I can send it straight to their email. So can someone show me a guild or some way that I can edit this?
[Release]TQ register script
07/19/2009 - CO2 PServer Guides & Releases - 19 Replies
Hey This Is TQ register script php You Need Wamp Its perfect TQ register script try it And Give Me Thanks If I Helped You
Buy Mage on Trieste with register email
10/27/2008 - Trading - 0 Replies
I am looking for a mage in trieste server that come with the original email that was register with the account. lvl gotta be 100+ and tell me how much coins or dils u want for that mage.
HTML register page Connected to Email
07/04/2008 - Conquer Online 2 - 9 Replies
can someone help me with a register page on a html website? i want that the registerpage is connected to my email so when someone register i see the username in my email box i dont need a box for the password only the username if someone knows how to make that please help me then.



All times are GMT +1. The time now is 17:26.


Powered by vBulletin®
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
SEO by vBSEO ©2011, Crawlability, Inc.
This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

Support | Contact Us | FAQ | Advertising | Privacy Policy | Terms of Service | Abuse
Copyright ©2025 elitepvpers All Rights Reserved.