Trying to backup things from old files I have found, I'm sure this is something simple, but I just cant figure it out, have tried several things. It never seems to load the next step, just reloads the first one. As I said this is an old file..it might have never worked but its all I could find to work with right now.
And yes I know it does look ugly, if anyone could give me a hand it would be much appreciated
And yes I know it does look ugly, if anyone could give me a hand it would be much appreciated
Code:
<?
include("html.php");
$html = mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];"));
if(!$step){$step=1;}
if(($step1 == 1) && ($agree == yes)){ header("Location: ?step=2"); }
elseif(($step1 == 1) && ($agree != yes)){ header("Location: ?warn=yes"); }
elseif(($step2 == 1) && ($agree == yes)){ header("Location: ?step=3"); }
elseif(($step2 == 1) && ($agree != yes)){ header("Location: ?step=2&warn=yes"); }
if($signup)
{
$host=gethostbyaddr("$REMOTE_ADDR");
$code = md5($username.trucode.$password);
$pin = md5($email.trucode);
if ((!preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i', $username)) || (strstr($username,".")))
{ $msg="• Invalid username: a-Z 0-9 -_ charactors only."; $username=""; }
elseif ((strlen($username) <= 2) || (strlen($username) >= 19))
{ $msg="• Invalid username: must be at least 3-18 in length."; $username=""; }
elseif (fetch("SELECT username FROM $tab[user] WHERE username='$username';"))
{ $msg="• Invalid username: already taken."; $username="";}
elseif ((!preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i', $password)) || (strstr($password,".")))
{ $msg="• Invalid password: a-Z 0-9 -_ charactors only."; $password=""; $cpassword=""; }
elseif ((strlen($password) <= 2) || (strlen($password) >= 13))
{ $msg="• Invalid password: must be at least 3-12 in length."; $password=""; $cpassword=""; }
elseif ($password != $cpassword)
{ $msg="• Invalid password: your passwords do not match."; $password=""; $cpassword=""; }
elseif (!ereg("^.+@.+\\..+$", $email))
{ $msg="• Invalid email: that is not a valid e-mail address."; $email=""; }
elseif (fetch("SELECT email FROM $tab[user] WHERE email='$email';"))
{ $msg="• That e-mail address has already been used."; $email="";}
elseif ((!preg_match ('/^[a-z]*$/i', $first)) || (strstr($first,".")))
{ $msg="• Invalid first name: a-Z charactors only."; $first=""; }
elseif ((!preg_match ('/^[a-z]*$/i', $last)) || (strstr($last,".")))
{ $msg="• Invalid last name: a-Z charactors only."; $last=""; }
elseif (($age <= 13) || ($age >= 80))
{ $msg="• Invalid age: you must be 14 years or older to play."; $age=""; }
elseif (($messager == AIM) && (!preg_match ('/^[a-z0-9][a-z0-9]*$/i', $messager_id)))
{ $msg="• Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
elseif (($messager == MSN) && (!ereg("^.+@.+\\..+$", $messager_id)))
{ $msg="• Invalid msn email: that is not a valid e-mail address.."; $messager=""; $messager_id=""; }
elseif (($messager == YaHoO) && (!preg_match ('/^[a-z0-9][a-z0-9]*$/i', $messager_id)))
{ $msg="• Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
else {
mysql_query("INSERT INTO $tab[user] (username,password,email,fullname,age,messager,online,ip,host,code,membersince) VALUES ('$username','$password','$email','$first $last','$age','$messager: $messager_id','$time','$REMOTE_ADDR','$host','$code','$time');");
mail_1("Welcome to Purepimps.com!","\nWelcome to PurePimps.com!\n\nYour account information:\n Username: $username\n Password: $password\n Pin: $pin\n\nBefore you can login, you must verify your email address.\n\nTo confirm this email address click on the bottom link, or copy and paste it to your browser.\n$site[location]confirm.php?verify=yes&email=$email&pin=$pin\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n","$email");
mail_2("Welcome to PurePimps.com!","\nWelcome to the PurePimps.com!\n\nYour account information:\n Username: $username\n Password: $password\n Pin: $pin\n\nBefore you can login, you must verify your email address.\n\nTo confirm this email address click on the bottom link, or copy and paste it to your browser.\n$site[location]confirm.php?verify=yes&email=$email&pin=$pin\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n","$email");
header("Location: signup.php?step=4&email=$email");
}
}
siteheader();
//LAMER CHECK//////////////
$host=gethostbyaddr("$REMOTE_ADDR");
$getbans =mysql_query("SELECT banned FROM $tab[banned];");
$bans = array();
while($ban=mysql_fetch_array($getbans)) {
array_push($bans, $ban[0]);
}
foreach ($bans as $correct){
if(strstr($host,"$correct")){
$banreason = mysql_fetch_array(mysql_query("SELECT reason FROM $tab[banned] WHERE banned='$correct';"));
?>
<table width="99%" height="100%">
<tr>
<td valign="top">
<br><b>Your account has been permently banned from PurePimps.
<br>Here is our stated reason:</b><br><br><font color="#7777CC"><?=$banreason[0]?></font>
</td>
</tr>
</table>
<?
$lamerstop=1;
}
}
////////////////////////////
if($lamerstop!=1){
?>
<table width="100%" height="100%">
<tr>
<td height="12"><b>Signing up: <font color="#89B93A">Step <?=$step?></font></b></td>
</tr>
<tr>
</tr>
<tr>
<td valign="top">
<?
if($step==4){?>
<br>A e-mail has been sent to <font color="#89B93A"><?=$email?></font> containing instructions and a pin number you need to verify your account.
<br>
<br><a href="confirm.php"><font color="#FFFFFF">Click</font> here <font color="#FFFFFF">to enter your pin</font></a>
<br>
<br>Didnt receive your pin number?
<br><a href="resend.php">request it again</a>
<br>
<br>Still having problems?
<br><a href="support.php">get help</a>
<br>
<?}elseif($step==3){?>
<form method="post" action="signup.php?step=3">
<?if($msg){?><center><b><font color="#89B93A"><?=$msg?></font></b></center><?}?>
<table align="center" cellspacing="1">
<tr>
<td colspan="2" bgcolor="#000022"><b>Login Info:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">username:</td><td bgcolor="#660066"><input type="text" name="username" maxlength="18" value="<?=$username?>"> <font color="#CCCCCC" size="1">3-18 length, a-Z 0-9 Charactors.</font></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">password:</td><td bgcolor="#660066"><input type="password" name="password" maxlength="12" value="<?=$password?>"> <font color="#CCCCCC" size="1">3-12 length, a-Z 0-9 Charactors.</font></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">confirm password:</td><td bgcolor="#660066"><input type="password" name="cpassword" maxlength="12" value="<?=$cpassword?>"></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">e-mail address:</td><td bgcolor="#660066"><input type="text" name="email" maxlength="100" value="<?=$email?>"></td>
</tr>
<tr>
<td colspan="2" bgcolor="#000022"><b>Personal:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">first name:</td><td bgcolor="#660066"><input type="text" name="first" maxlength="25" value="<?=$first?>"></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">last name:</td><td bgcolor="#660066"><input type="text" name="last" maxlength="25" value="<?=$last?>"></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">age:</td><td bgcolor="#660066"><input type="text" name="age" size="4" maxlength="2" value="<?=$age?>"> <font color="#CCCCCC" size="1">14+ only.</font></td>
</tr>
<tr>
<td colspan="2" bgcolor="#000000"><b>Misc:</b> <font color="#CCCCCC">Optional</font></td>
</tr>
<tr>
<td align="right" bgcolor="#333366">instant messager:</td><td bgcolor="#660066"> <select name="messager"><option <?if($messager==""){echo"selected";}?>>N/A</option><option value="AIM" <?if($messager=="AIM"){echo"selected";}?>>AIM</option><option value="MSN" <?if($messager=="MSN"){echo"selected";}?>>MSN</option><option value="YaHoO" <?if($messager=="YaHoO"){echo"selected";}?>>YaHoO</option></select> <input type="text" name="messager_id" size="14" maxlength="50" value="<?=$messager_id?>"> <font color="#CCCCCC" size="1">so we may contact you if important.</font></td>
</tr>
<tr>
<td colspan="2" bgcolor="#000022" align="center"><br><b>You ip address is being logged as: <font color="#89B93A"><?=$REMOTE_ADDR?></font></b><br><br></td>
</tr>
<tr>
<td align="center" colspan="2" bgcolor="#000022"><input type="submit" name="signup" value="signup"> <input type="reset" value="cancel"></td>
</tr>
</table>
<br>
</form>
<?}elseif($step==2){?>
<form method="post" action="signup.php">
<?if($warn==yes){?><b><?}?>In order to proceed, you must agree with the following Game Rules:</b>
<table width="100%">
<tr>
<td colspan="2">
<div style="border:thin inset;background: #000022; padding:6px; height:175px; overflow:auto"><?=$html[0]?></div>
</td>
</tr>
<tr>
<td><input type="checkbox" name="agree" value="yes" style="background: #111111;"> <input type="hidden" name="step2" value="1"> <strong>I have read, and agree to abide by the Game Rules.</strong></td>
<td align="right"><input type="submit" value="next >>"></td>
</tr>
</table>
</form>
<?}else{?>
<form method="post" action="signup.php">
<?if($warn==yes){?><b><?}?>In order to proceed, you must agree with the following Terms of Service:</b>
<table width="100%">
<tr>
<td colspan="2">
<div style="border:thin inset;background: #000022; padding:6px; height:175px; overflow:auto"><?=$html[1]?></div>
</td>
</tr>
<tr>
<td><input type="checkbox" name="agree" value="yes" style="background: #111111;"> <input type="hidden" name="step1" value="1"> <strong><nobr>I have read, and agree to abide by the Terms of Service.</nobr></strong></td>
<td align="right"><input type="submit" value="next >>"></td>
</tr>
</table>
</form>
<?}?>
</td>
</tr>
</table>
<?}
sitefooter();
?>





