Well, I finally got the server working, but now how to get the register working, I downloaded the register files from the sticky thread but no idea how to get it set up right.
I don't exactly know all the info it's asking for in the register.php and the config.php
If someone could tell me or put it into more detail of what goes where then I could get past this problem.
Config.php
Register.php
I don't exactly know all the info it's asking for in the register.php and the config.php
If someone could tell me or put it into more detail of what goes where then I could get past this problem.
Config.php
Code:
<?php
// Configurations
$myhost="65.75.250.41";
$mypass="binhazad"; //your server login password
$myuser="necron"; //your server login username
$mydbacc="account"; //your server account database
$mydbdata="MY"; //your server my database name
$serveraddress="65.75.250.41"; //your server ip
$accport=9958; //your ACC connection port
$msgport=5816; //your MSG connection port
$npcport=9958; //your MSG connection port
$servername="Alpha-0nline"; //your server name
$mydb="MY"; //your server my database
$forum="127.0.0.1";
$mydb = "MY"; //your server my database
// Dont Edit after this
mysql_connect($myhost,$myuser,$mypass);
mysql_select_db($mydb);
?>
Code:
<?
$myhost="65.75.250.41";
$mypass="binhazad"; //your server login password
$myuser="necron"; //your server login username
$mydbacc="account"; //your server account database
$mydbdata="MY"; //your server my database name
$serverport=3306; //your server connection port
$mydb="MY"; //your server my database
$servername="Alpha-Online";
// 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" />
<title>My Server Register</title>
<script type="text/javascript" src="./inc/md5.js"></script>
</head>
<DIV align="center"><b class="h2"><font color="white">
<?php
echo "Welcome to ".$servername." Account Registration";
?>
</b>
<br />
<br />
<form method='post' action='register.php'>
<TABLE width="312">
<TBODY>
<TR>
<TD id=GoodStuff style="PADDING-LEFT: 0px; MARGIN-LEFT: 0px">
<DIV id=theform style="PADDING-LEFT: 0px">
<TABLE class=body width="323" height="229">
<TBODY>
<TR>
<TD align="left" height="32"><font color="white">UserID:</TD>
<TD class=it3 height="32">
<INPUT class=it style="FONT-SIZE: 9pt" name="id" id="id"> </TR>
<TR>
<TD align="left" height="37"><font color="white">Password:</TD>
<TD class=it3 height="37">
<INPUT class=it id="ipassword" style="FONT-SIZE: 9pt" type=password maxLength=12 name=pass></TD>
</TR>
<TR>
<TD align="left" height="32"><font color="white">Retype Password:</TD>
<TD class=it3 height="32">
<input class=it1 id="ipassword" style="FONT-SIZE: 9pt" type=password maxlength=12 name=retpass></TD>
</TR>
<TD align="left" height="32"><font color="white">Email:</TD>
<TD class=it3 height="32">
<INPUT class=it style="FONT-SIZE: 9pt" name=email>
<TR>
<TD></TD>
<TD style="FONT-SIZE: 14px; VERTICAL-ALIGN: middle">
<span style="font-size: 9pt"><input type="hidden" name="hash"><input class=Butt type=submit onclick="hash.value = login(pass.value)" value='Register' name=B1></span></TD>
</TR></TBODY></TABLE>
</DIV></TD></TR></TBODY></TABLE></FORM>
<center>
<?php
if($_POST['B1'])
{
mysql_select_db($mydbacc);
$userid = trim($_POST['id']);
$password=trim($_POST['pass']);
$passretype=trim($_POST['retpass']);
$hash=$_POST['hash'];
$email=trim($_POST['email']);
if($password != $passretype) {
echo "Password not equal to Retyped Password.";
}else{
if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
{
echo "Only letters or numbers, length of 4 to 12 characters";
}
else
{
$res = mysql_query("select * from account where name = '".$userid."' order by id desc");
if(mysql_num_rows($res) == 0)
{
mysql_query("insert into account (name,Password,Reg_date,email) values ('".$userid."','".$hash."','".date("y-m-d H:i:s", time())."','".$email."')");
echo "Account registered successfully.";
}
else
{
echo "Account Already exists in database.";
}
}
}
}
?>
</center>
</DIV>
</body>
</html>