Help with register page?

04/19/2009 18:59 Rice934#1
When i register [im using wamp not appserv] it keeps saying "Register Failed" over and over.
04/19/2009 21:15 BrokeN^WinG#2
Try Setup Appserv and Put Files There Appserv/www
04/19/2009 21:18 LetterX#3
It doesn't matter what you use. Both have PHP, Apache, and MySQL. >_>

Post the script. There might be an error in it.
04/20/2009 00:28 Rice934#4
Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
		<meta http-equiv="content-type" content="text/html; charset=iso-8859-15" />
		<meta name="description" content="ConquerOnlineCMS." />
		<meta name="keywords" content="Conquer Online, pauldexter" />
		<meta name="author" content="Matt" />
        <link href="../images/style.css" rel="stylesheet" type="text/css" />
        <link href="../templates/default/basic.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form action="?op=register" method="post">
  <div align="center"><br />
  </div>
  <table width="338" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Website Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Repeat Password: </td>
      <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
    </tr>
  </table>
  <p align="center">&nbsp;</p>
  <p align="center">
    <input name="submit" type="submit" class="liteoption" value="Register" />
  </p>
</form>
<div align="center">
  <?php
if(isset($_POST['submit'])) {
if(!$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die('You must fill in all of the feilds!!!<BR>');
}
if(!get_magic_quotes_gpc()) {
$user = addslashes($_POST['user']);
$pass = md5($_POST['pass1']);
} else {
$user = $_POST['user'];
$pass = md5($_POST['pass1']);
}
$pass2 = md5($_POST['pass2']);
$check = mysql_query("SELECT * FROM accounts WHERE accountid = '$user'");
$check2 = mysql_num_rows($check);
if($check2 != '0') {
die("Username: '".$user."' is in use!");
}
if($pass != $pass2) {
die('Passwords dont match!');
}

$insert_member = mysql_query("INSERT INTO accounts (accountid, webpassword, logontype, status) VALUES ('$user', '$pass', '2', '2')");
if($insert_member) {
echo("<p class='b01'>Registration Complete! <a href=?op=home>Click here</a>");
} else {
echo("<p class='b01'>Registration Failed!</p>");
}}
?>	
</div>
</body>
</html>
Here it is. it looks perfect to me.. :\
04/20/2009 01:46 IcedEarth#5
Try this one ;) Should work just fine :D

PHP Code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
<head>
<title></title>
        <meta http-equiv="content-type" content="text/html; charset=iso-8859-15" />
        <meta name="description" content="ConquerOnlineCMS." />
        <meta name="keywords" content="Conquer Online, pauldexter" />
        <meta name="author" content="Matt" />
        <link href="../images/style.css" rel="stylesheet" type="text/css" />
        <link href="../templates/default/basic.css" rel="stylesheet" type="text/css" />
</head>

<body>
<form action="?op=register" method="post">
  <div align="center"><br />
  </div>
  <table width="338" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Website Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Repeat Password: </td>
      <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
    </tr>
  </table>
  <p align="center">&nbsp;</p>
  <p align="center">
    <input name="submit" type="submit" class="liteoption" value="Register" />
  </p>
</form>
<div align="center">
<?php
if(isset($_POST['submit'])) {
if(!
$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die(
'You must fill in all of the feilds!!!<BR>');
}
if(!
get_magic_quotes_gpc()) {
$user addslashes($_POST['user']);
$pass md5($_POST['pass1']);
} else {
$user $_POST['user'];
$pass md5($_POST['pass1']);
}
$pass2 md5($_POST['pass2']);
$check mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
$check2 mysql_num_rows($check);
if(
$check2 != '0') {
die(
"Username: '".$user."' is in use!");
}
if(
$pass != $pass2) {
die(
'Passwords dont match!');
}

$insert_member mysql_query("INSERT INTO accounts (AccountID, WebPassword, LogonType, Status) VALUES ('$user', '$pass', '2', '2')");
if(
$insert_member) {
echo(
"<p class='b01'>Registration Complete! <a href=?op=home>Click here</a>");
} else {
echo(
"<p class='b01'>Registration Failed!</p>");
}}
?>    
</div>
</body>
</html>
04/20/2009 02:01 Rice934#6
it still fails... WTF @_@;;
04/20/2009 02:31 IcedEarth#7
Try this then :)

PHP Code:
<form action="?op=register" method="post">
  <div align="center"><br />
  </div>
  <table width="338" border="0" align="center">
    <tr>
      <td width="132" height="20" class="b01">Username:</td>
      <td width="196"><label>
        <input name="user" type="text" class="liteoption" id="user" size="15" maxlength="15" />
      </label></td>
    </tr>
    <tr>
      <td height="25" class="b01">Password:</td>
      <td><input name="pass1" type="password" class="liteoption" id="pass1" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Repeat Password: </td>
      <td><input name="pass2" type="password" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
    </tr>
    <tr>
      <td height="24" class="b01">Your favorite class: </td>
      <td><input name="favcla" type="text" class="liteoption" id="pass2" size="15" maxlength="15" /></td>
    </tr>
  </table>
  <p align="center">&nbsp;</p>
  <p align="center">
    <input name="submit" type="submit" class="liteoption" value="Register" />
  </p>
</form>
<div align="center">
  <?php
if(isset($_POST['submit'])) {
if(!
$_POST['user'] || !$_POST['pass1'] || !$_POST['pass2']) {
die(
'You must fill in all of the feilds!!!<BR>');
}
if(!
get_magic_quotes_gpc()) {
$user addslashes($_POST['user']);
$pass md5($_POST['pass1']);
} else {
$user $_POST['user'];
$pass md5($_POST['pass1']);
}
$pass2 md5($_POST['pass2']);
$check mysql_query("SELECT * FROM accounts WHERE AccountID = '$user'");
$check2 mysql_num_rows($check);
if(
$check2 != '0') {
die(
"Username: '".$user."' is in use!");
}
if(
$pass != $pass2) {
die(
'Passwords dont match!');
}

$insert_member mysql_query("INSERT INTO accounts (AccountID, WebPassword, LogonType, FavoriteClass) VALUES ('$user', '$pass', '2', '$favcla')");
if(
$insert_member) {
echo(
"<p class='b01'>Registration Complete! <a href=?op=home>Click here</a>");
} else {
echo(
"<p class='b01'>Registration Failed!</p>");
}}
?>    
</div>
04/20/2009 20:06 Rice934#8
That still failed :(
04/20/2009 21:08 r.0ck#9
the password is encrypted so you have to use something else for PHP, i dont know im not a PHP master or learner..anyway just make it so you dont insert a password and do it so its just a username... Watch the video guide coattack released the register page is attached at bottom he tells you how to set it up in there . Very simple , very fast, and it works.
04/20/2009 21:58 glupkotrup#10
One questions... From the script from IcedEarth (The owner from LOTF that I respect :)) did you redirect it your database or just copy/paste it :rolleyes:
04/20/2009 22:02 Rice934#11
x__________x;; still need help XD
04/21/2009 01:16 IcedEarth#12
# glupkotrup :
uhm if you would see its inserts automaticly to database with command on last rows. I know what im posting or doing.
04/22/2009 00:39 Rice934#13
x_x Oh well. still need helps on it. D: