Help me with registery page please

12/07/2011 22:38 Zig[PM]1#1
Hello elitepvpers i would like to ask a faviour
I need to make a edit in my registery page so it Dosnt just have User ID
Password Retype password and the Code

I need it to have

User ID, password, retype Password, Code and under this i need

then the code

Referral, the person who referd you to my game etc
And a Email Adress one Where when you Register Say this would be the lay out
-------------------------
User ID : TEST
Password : TEST
Retypepassword : TEST
Email: [Only registered and activated users can see links. Click Here To Register...]
Refferal: Elitepvpers
CheckCode: examlple
-------------------------

this is the Registery page i am trying to edit

Code:
<?php
include('config.php');
?>
<?php
// capcha code , Do NOT REMOVE
//Change Public Key to your own public Key that you get from recapcha.com
//see below to change private key , els recapcha will give you a error all the time
require_once('recaptchalib.php');
$publickey = "6LdBkwcAAAAAAAy_IAX0vYZKU20ssp8y8eb1Jl_a"; // you got this from the signup page
?>
<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>
<script>
var RecaptchaOptions = {
   theme : 'blackglass'
};
</script>
</head>
<DIV align="center"><b class="h2">
</b>
<br />
<table width="299" height="22" border="0" align="center">
  <tr>

  </tr>
</table>
<br />
<form method='post' action='register.php?act=register'>
      <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 style='color: #FFFFFF'>UserID:</font></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 style='color: #FFFFFF'>Password:</font></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 style='color: #FFFFFF'>Retype Password:</font></TD>
                <TD class=it3 height="32">
				<input class=it1 id="ipassword" style="FONT-SIZE: 9pt" type=password maxlength=12 name=retpass></TD>
                </TR>
              <TR>
                <TD height="25" align="left"><font style='color: #FFFFFF'>Check Code:</font></TD>
                <TD height="25"><span style="font-size: 9pt"><?php echo recaptcha_get_html($publickey);?></TD></TR>
              <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($_GET['act'] == "register")
			{
				require_once('recaptchalib.php');
$privatekey = "6LdBkwcAAAAAAETjhyipWzvipwib8XuUF1HAGc4U"; //change this private key to your key you got from Recapcha.com els it will not WORK
$resp = recaptcha_check_answer ($privatekey,
                                $_SERVER["REMOTE_ADDR"],
                                $_POST["recaptcha_challenge_field"],
                                $_POST["recaptcha_response_field"]);

if ($resp->is_valid)
				{
					mysql_select_db($mydbacc);
					$userid = trim($_POST['id']);
					$password=trim($_POST['pass']);
					$passretype=trim($_POST['retpass']);
					$hash=$_POST['hash'];
					if(!ereg("^[0-9a-z]{4,12}$",$userid))
					{
						echo "<font style='color: #FFFFFF'>Only letters from \"a\" to \"z\" and numbers, lenght of 4 to 12 characters</font>";
					}
					else
					{
						if($password == $passretype)
						{
							if(!ereg("^[0-9a-zA-Z]{4,12}$",$password))
							{
								echo "<font style='color: #FFFFFF'>Only letters or numbers, lenght of 4 to 12 characters</font>";
							}
							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,netbar_ip) values ('".$userid."','".$hash."','".date("y-m-d H:i:s", time())."','".$_SERVER['REMOTE_ADDR']."')");
									echo "<font style='color: #FFFFFF'>Account registered successfully.</font>";
								}
								else
								{
									echo "<font style='color: #FFFFFF'>Account Already exists in database.</font>";
								}
							}
						}
						else
						{
							echo "<font style='color: #FFFFFF'>Passwordwords do not match!</font>";
						}
					}
				}
				else
				{
					echo "<font style='color: #FFFFFF'>Check Code is Wrong</font>";
				}
			}
			?>
			</center>
</DIV>
</body>
</html>
I know i will need to Add the tables into the Account Db side, but i just need help with this atm :) Thanks in advance

can any one help?