When i register [im using wamp not appserv] it keeps saying "Register Failed" over and over.
<!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"> </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>
<!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"> </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>
<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"> </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>