TalkPHP
 
 
Account Login
Latest Articles
» The basic usage of PHPTAL, a XML/XHTML template library for PHP
» Vulnerable methods and the areas they are commonly trusted in.
» Simple way to protect a form from bot
» The Basics On: How Session Stealing Works
» How to keep your forms from double posting data
IRC Channel
IRC Speech Bubble Join the friendly bunch on IRC...
(#TalkPHP on Freenode)

...Also available via a web interface.

See this thread for information on the TalkPHP Free Hugs Initiative™. Subject to availability.
Associates
Associates
CSS Tutorials
Reply
 
LinkBack Thread Tools Search this Thread Display Modes
Old 11-28-2008, 06:08 AM   #1 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default retrieving data

I have currently recoded the signup page for my site and I have changed it a lot and I created a few more tables to my database. However it is not getting the tables correctly. I am getting errors with the following lines


$html = mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];"))

while($ban=mysql_fetch_array($getbans)) {

everything in them are correct. But for some reason I keep getting the normal errors with the database which are these.

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home1/clubbink/public_html/signup.php on line 13

Warning: mysql_fetch_array(): supplied argument is not a valid MySQL result resource in /home1/clubbink/public_html/signup.php on line 325

If someone could help me would appreciate it a lot
KingOfTheSouth is offline  
Reply With Quote
Old 11-28-2008, 08:20 AM   #2 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

i dont think if this is right..
PHP Code:
$html mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];")) 
as what you can see in your error, you supplied a wrong parameter in your mysql_fetch_array() function in php.

In retrieving data from your tables have it like this way.

PHP Code:
$query "select * from table_name"#im using a wildcard(*) here as an example
$result mysql_query($query$resouce_link) or die("Could not execute query!.");

while(
$ban mysql_fetch_array($resultMYSQL_BOTH))
{
    
# do something here...

and its much better if you post your entire code here, so that we can help you and we will know what really is the problem in it. Im confuse in your select statement
Code:
$tab[html]
? i dont think so if your having a table name like that or your table name is stored in an array? or a variable? its confusing.
Have a good read in the manual here.MySql 5.0 Reference Manual

Also if you try to check your while statement, where did you get the $getbans variable? I guess you need to replace it with a variable stored with a query.
e.g
Code:
$getban = mysql_query("some sql query here", $resource_link) or die("You Fail!");

All the best,
t3st
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 11-28-2008, 08:46 AM   #3 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

For more references have a reading on this tutorials. This will help you a lot.

Retrieving data with Sql Queries
Retrieving data From a MySql Database

Hope that helps!.
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 11-28-2008, 03:55 PM   #4 (permalink)
The Wanderer
 
c-through's Avatar
 
Join Date: Nov 2008
Posts: 13
Thanks: 0
c-through is on a distinguished road
Default

Jeah this SQL looks wrong for me to.
Quote:
SELECT rules,tos FROM $tab[html]
__________________
Hello World!
c-through is offline  
Reply With Quote
Old 11-28-2008, 04:30 PM   #5 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Well I actually did not make this. Someone gave me a copy of their game that they could not keep it up so they gave me the script. But it all worked on another game.
KingOfTheSouth is offline  
Reply With Quote
Old 11-29-2008, 04:06 AM   #6 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

t3st mentioned it would be better if I posted the whole code so I will do that here it is.

<?
include("game_html.php");

$html = mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];"));

if($ref){ setcookie("refer",$refer, time()+7776000); }
if($ref){ setcookie("ref",$ref); }
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="&#149 Invalid username: a-Z 0-9 -_ charactors only."; $username=""; }
elseif ((strlen($username) <= 2) || (strlen($username) >= 19))
{ $msg="&#149 Invalid username: must be at least 3-18 in length."; $username=""; }
elseif (fetch("SELECT username FROM $tab[user] WHERE username='$username';"))
{ $msg="&#149 Invalid username: already taken."; $username="";}
elseif ((!preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i', $password)) || (strstr($password,".")))
{ $msg="&#149 Invalid password: a-Z 0-9 -_ charactors only."; $password=""; $cpassword=""; }
elseif ((strlen($password) <= 2) || (strlen($password) >= 13))
{ $msg="&#149 Invalid password: must be at least 3-12 in length."; $password=""; $cpassword=""; }
elseif ($password != $cpassword)
{ $msg="&#149 Invalid password: your passwords do not match."; $password=""; $cpassword=""; }
elseif (!ereg("^.+@.+\\..+$", $email))
{ $msg="&#149 Invalid email: that is not a valid e-mail address."; $email=""; }
elseif (fetch("SELECT email FROM $tab[user] WHERE email='$email';"))
{ $msg="&#149 That e-mail address has already been used."; $email="";}
elseif ((!preg_match ('/^[a-z]*$/i', $first)) || (strstr($first,".")))
{ $msg="&#149 Invalid first name: a-Z charactors only."; $first=""; }
elseif ((!preg_match ('/^[a-z]*$/i', $last)) || (strstr($last,".")))
{ $msg="&#149 Invalid last name: a-Z charactors only."; $last=""; }
elseif (($age <= 13) || ($age >= 100))
{ $msg="&#149 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="&#149 Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
elseif (($messager == MSN) && (!ereg("^.+@.+\\..+$", $messager_id)))
{ $msg="&#149 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="&#149 Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."; $messager=""; $messager_id=""; }
elseif (fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR';"))
{ $msg="&#149 There is already an account registered from your computer. If you think this is a mistake, please email the Administrator. Jamaicanguy202@hotmail.com";}
else {
/*mysql_query("UPDATE $tab[user] SET credits=credits+2000 WHERE id=$refer");
mysql_query("UPDATE $tab[user] SET referrals=referrals+1 WHERE id=$refer");
mysql_query("UPDATE $tab[user] SET refcredits=refcredits+2000 WHERE id=$refer");*/
mysql_query("INSERT INTO $tab[user] (username,password,email,fullname,age,messager,onl ine,ip,host,code,membersince,referredby,refcredits ) VALUES ('$username','$password','$email','$first $last','$age','$messager: $messager_id','$time','$REMOTE_ADDR','$host','$cod e','$time','$refer','$refcredits');");
mail_1("Welcome to ClubbinKings!","\nWelcome to ClubbinKings!\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&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself!\n","$email");
mail_2("Welcome to ClubbinKings.com!","\nWelcome to the ClubbinKings.net!\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&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself but doing this you wont be first to hear our new news!\n","$email");

header("Location: signup.php?step=4&email=$email&referer=$refer");

}
}

siteheader();

//LAMER CHECK//////////////

$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';"));
?>
<link href="style.css" rel="stylesheet" type="text/css" />

<table width="99%" height="100%">
<tr>
<td valign="top">
<br>
<b>Your account has been permenatly banned from ClubbinKings.com!!.
<br>
Here is our stated reason:</b><br><br><font color="#7777CC"><?=$banreason[0]?></font>
</td>
</tr>
</table>
<?

$lamerstop=bitch;
}
}

////////////////////////////
if($lamerstop!=bitch){
?>
<table width="100%" class="maintxt" height="100%">
<tr>
<td height="12"><b>Signing up: <font color="#FFCC00">Step <?=$step?></font></b></td>
</tr>
<tr>
<td valign="top">
<?
if($step==4){?>
<br>THANKS FOR JOINING ClubbinKings.com! An E-mail has been sent to <font color="#ff0000"><?=$email?></font> containing instructions and a pin number you need to verify your account!
<br>
<br><a href="confirm.php?referer=<?=$referer?>"><font color="#FFFFFF">Click</font> here <font color="#FFFFFF">to enter your pin number!</font></a>
<br>
<br>Didnt receive your pin number? Our Bad!
<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="#FFCC00"><?=$msg?></font></b></center><?}?>
<table align="center" cellspacing="2" cellpadding="2" class="maintxt">
<tr bgcolor="#FFFFFF">
<td colspan="2" bgcolor="#000000">&nbsp;</td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" class="border"><b>Login Info:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">&nbsp;</td>
<td bgcolor="#000000">&nbsp;</td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Username:</td>
<td><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="#000000">Password:</td>
<td><input type="password" name="password" maxlength="18" value="<?=$password?>"> <font color="#CCCCCC" size="1">3-12 length, a-Z 0-9 Charactors.</font></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">Confirm Password:</td>
<td><input type="password" name="cpassword" maxlength="18" value="<?=$cpassword?>"></td>
</tr>
<tr>
<td align="right" bgcolor="#000000">E-mail Address:</td>
<td><input type="text" name="email" maxlength="100" value="<?=$email?>">
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" bgcolor="#000000" class="border"><b>Personal:</b> <font color="#CCCCCC">Required</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">First Name:</td>
<td><input type="text" name="first" maxlength="25" value="<?=$first?>"></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Last Name:</td>
<td><input type="text" name="last" maxlength="25" value="<?=$last?>"></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">Age:</td>
<td><input type="text" name="age" size="4" maxlength="2" value="<?=$age?>">
<font color="#CCCCCC" size="1">15+ only.</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right" bgcolor="#000000">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="#000000">
<td colspan="2" class="border"><b>Misc:</b> <font color="#CCCCCC">Optional</font></td>
</tr>
<tr bgcolor="#000000">
<td align="right">&nbsp;</td>
<td>&nbsp;</td>
</tr>
<tr bgcolor="000000">
<td align="right">instant messager:</td>
<td> <select name="messager"><option class="maintxt" <?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";}?>>YaHo O</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 align="right"><strong>Referred By: ( If Referred )</strong></td><td> &nbsp;<? if($refer){ echo"<b>$refer</b><input type=hidden name=refer value=$refer>"; } ?></td>
</tr>
<tr bgcolor="000000">
<td colspan="2" align="center"><br>
<b>You ip address is being logged as: <font color="#FFCC00"><?=$REMOTE_ADDR?></font></b><br>
when signing up yahoo and aol emails dont work to well to get the verify email so id use something else <br></td>
</tr>
<?php
$sagain = fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR'");
?>
<?if($sagain){ ?>
<tr bgcolor="000000">
<td colspan="2" align="center"><strong><font color="ff0000">This "<?=$REMOTE_ADDR?>" ip has already been used, the admins will be alerted as soon as you sign up!</strong></font><br>
<br></td>
</tr>
<? } ?>
<tr bgcolor="000000">
<td colspan="2" align="center"><input type="submit" name="signup" value="signup"> &nbsp; &nbsp; &nbsp; <input type="reset" value="cancel"></td>
</tr>
</table>
<br>
<input type="hidden" name="hash" value="f7610358ffcc3db6558310ea4a166bcb">
</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 class="maintxt" style="border:thin inset;background: #000000; 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 class="maintxt">I have read, and agree to abide by the Game Rules.</strong></td>
<td align="right"><input type="submit" value="next &raquo;&raquo;"></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 class="maintxt" style="border:thin inset;background: #000000; 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">
<span class="maintxt"><strong><nobr>I have read, and agree to abide by the Terms of Service.</nobr></strong></span></td>
<td align="right"><input type="submit" value="next &raquo;&raquo;"></td>
</tr>
</table>
</form>
<?}?>
</td>
</tr>
</table>
<?}
sitefooter();
?>
KingOfTheSouth is offline  
Reply With Quote
Old 11-29-2008, 07:18 AM   #7 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

w0w, atleast separate your codes. Example:
index.php
PHP Code:
some code here
mysql.class.php
PHP Code:
some code here 
And also try to post your code inside a :)

[.php]php code goes here[./php] #omit the (.) sign
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 11-29-2008, 05:17 PM   #8 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

Ok my bad did not know
KingOfTheSouth is offline  
Reply With Quote
Old 11-29-2008, 06:37 PM   #9 (permalink)
Super Moderator
Inquisitive 
 
codefreek's Avatar
 
Join Date: Sep 2007
Location: Near you.
Posts: 791
Thanks: 241
codefreek is on a distinguished road
Default

Use Php Tags!...
codefreek is offline  
Reply With Quote
Old 12-02-2008, 02:16 AM   #10 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

any update on your problem?
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Old 12-02-2008, 02:41 AM   #11 (permalink)
The Acquainted
 
KingOfTheSouth's Avatar
 
Join Date: Oct 2008
Location: Cincinnati
Posts: 151
Thanks: 14
KingOfTheSouth is on a distinguished road
Default

I still do not get it. I am having guesses that it is the html table in the database. That is the only problem I can think of at the moment.
KingOfTheSouth is offline  
Reply With Quote
Old 12-02-2008, 07:10 AM   #12 (permalink)
The Addict
 
zxt3st's Avatar
 
Join Date: Apr 2008
Posts: 200
Thanks: 18
zxt3st is on a distinguished road
Default

Is there any error on it? will you please post the error on it ? :)

Your code encloses in a php tag :)
PHP Code:
<?
include("game_html.php");

$html mysql_fetch_array(mysql_query("SELECT rules,tos FROM $tab[html];"));

if(
$ref){ setcookie("refer",$refertime()+7776000); }
if(
$ref){ setcookie("ref",$ref); }
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="&#149 Invalid username: a-Z 0-9 -_ charactors only."$username=""; }
       elseif ((
strlen($username) <= 2) || (strlen($username) >= 19))
              { 
$msg="&#149 Invalid username: must be at least 3-18 in length."$username=""; }
       elseif (
fetch("SELECT username FROM $tab[user] WHERE username='$username';"))
              { 
$msg="&#149 Invalid username: already taken."$username="";}
       elseif ((!
preg_match ('/^[a-z0-9][a-z0-9\.\-_]*$/i'$password)) || (strstr($password,".")))
              { 
$msg="&#149 Invalid password: a-Z 0-9 -_ charactors only."$password=""$cpassword=""; }
       elseif ((
strlen($password) <= 2) || (strlen($password) >= 13))
              { 
$msg="&#149 Invalid password: must be at least 3-12 in length."$password=""$cpassword=""; }
       elseif (
$password != $cpassword)
              { 
$msg="&#149 Invalid password: your passwords do not match."$password=""$cpassword=""; }
       elseif (!
ereg("^.+@.+\\..+$"$email))
              { 
$msg="&#149 Invalid email: that is not a valid e-mail address."$email=""; }
       elseif (
fetch("SELECT email FROM $tab[user] WHERE email='$email';"))
              { 
$msg="&#149 That e-mail address has already been used."$email="";}
       elseif ((!
preg_match ('/^[a-z]*$/i'$first)) || (strstr($first,".")))
              { 
$msg="&#149 Invalid first name: a-Z charactors only."$first=""; }
       elseif ((!
preg_match ('/^[a-z]*$/i'$last)) || (strstr($last,".")))
              { 
$msg="&#149 Invalid last name: a-Z charactors only."$last=""; }
       elseif ((
$age <= 13) || ($age >= 100))
              { 
$msg="&#149 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="&#149 Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."$messager=""$messager_id=""; }
       elseif ((
$messager == MSN) && (!ereg("^.+@.+\\..+$"$messager_id)))
              { 
$msg="&#149 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="&#149 Invalid screen name: sould only contain a-Z 0-9 charactors, no spaces."$messager=""$messager_id=""; }
        elseif (
fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR';"))
$msg="&#149 There is already an account registered from your computer. If you think this is a mistake, please email the Administrator. Jamaicanguy202@hotmail.com";}
       else {
               
/*mysql_query("UPDATE $tab[user] SET credits=credits+2000 WHERE id=$refer");
               mysql_query("UPDATE $tab[user] SET referrals=referrals+1 WHERE id=$refer");
               mysql_query("UPDATE $tab[user] SET refcredits=refcredits+2000 WHERE id=$refer");*/
mysql_query("INSERT INTO $tab[user] (username,password,email,fullname,age,messager,onl ine,ip,host,code,membersince,referredby,refcredits ) VALUES ('$username','$password','$email','$first $last','$age','$messager$messager_id','$time','$REMOTE_ADDR','$host','$cod e','$time','$refer','$refcredits');");
mail_1("Welcome to ClubbinKings!","\nWelcome to ClubbinKings!\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&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself!\n","$email");
mail_2("Welcome to ClubbinKings.com!","\nWelcome to the ClubbinKings.net!\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&refer er=$refer\n\nIf that link doesnt work, go to $site[location], login and enter in this pin:\n\n $pin\n\n-Admin\n\n\n-----------------------------\n-----------------------------\nAlso upon signup you were added to our Mailing list automatically! If you would like to be removed from this list please wait until you recieve the first letter and use the link at the botttom of the page to unsubscribe yourself but doing this you wont be first to hear our new news!\n","$email");

               
header("Location: signup.php?step=4&email=$email&referer=$refer");

              }
         }

siteheader();

//LAMER CHECK//////////////

$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';"));
?>
<link href="style.css" rel="stylesheet" type="text/css" />

<table width="99%" height="100%">
 <tr>
  <td valign="top">
  <br>
  <b>Your account has been permenatly banned from ClubbinKings.com!!.
  <br>
  Here is our stated reason:</b><br><br><font color="#7777CC"><?=$banreason[0]?></font>
  </td>
 </tr>
</table>
<?

$lamerstop
=bitch;
}
}

////////////////////////////
if($lamerstop!=bitch){
?>
   <table width="100%" class="maintxt" height="100%">
    <tr>
<td height="12"><b>Signing up: <font color="#FFCC00">Step <?=$step?></font></b></td>
    </tr>
    <tr>
     <td valign="top">
<?
         
if($step==4){?>
<br>THANKS FOR JOINING ClubbinKings.com! An E-mail has been sent to <font color="#ff0000"><?=$email?></font> containing instructions and a pin number you need to verify your account!
         <br>
<br><a href="confirm.php?referer=<?=$referer?>"><font color="#FFFFFF">Click</font> here <font color="#FFFFFF">to enter your pin number!</font></a>
         <br>
         <br>Didnt receive your pin number? Our Bad!
         <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="#FFCC00"><?=$msg?></font></b></center><?}?>
         <table align="center" cellspacing="2" cellpadding="2" class="maintxt">
          <tr bgcolor="#FFFFFF">
            <td colspan="2" bgcolor="#000000">&nbsp;</td>
          </tr>
          <tr bgcolor="#000000">
<td colspan="2" class="border"><b>Login Info:</b> <font color="#CCCCCC">Required</font></td>
          </tr>
          <tr>
            <td align="right" bgcolor="#000000">&nbsp;</td>
            <td bgcolor="#000000">&nbsp;</td>
          </tr>
          <tr bgcolor="#000000">
           <td align="right" bgcolor="#000000">Username:</td>
<td><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="#000000">Password:</td>
<td><input type="password" name="password" maxlength="18" value="<?=$password?>"> <font color="#CCCCCC" size="1">3-12 length, a-Z 0-9 Charactors.</font></td>
          </tr>
          <tr>
           <td align="right" bgcolor="#000000">Confirm Password:</td>
           <td><input type="password" name="cpassword" maxlength="18" value="<?=$cpassword?>"></td>
          </tr>
          <tr>
           <td align="right" bgcolor="#000000">E-mail Address:</td>
           <td><input type="text" name="email" maxlength="100" value="<?=$email?>"> 
          </tr>
          <tr bgcolor="#000000">
            <td align="right" bgcolor="#000000">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="#000000">
<td colspan="2" bgcolor="#000000" class="border"><b>Personal:</b> <font color="#CCCCCC">Required</font></td>
          </tr>
          <tr bgcolor="#000000">
            <td align="right" bgcolor="#000000">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="#000000">
           <td align="right" bgcolor="#000000">First Name:</td>
           <td><input type="text" name="first" maxlength="25" value="<?=$first?>"></td>
          </tr>
          <tr bgcolor="#000000">
           <td align="right" bgcolor="#000000">Last Name:</td>
           <td><input type="text" name="last" maxlength="25" value="<?=$last?>"></td>
          </tr>
          <tr bgcolor="#000000">
           <td align="right" bgcolor="#000000">Age:</td>
           <td><input type="text" name="age" size="4" maxlength="2" value="<?=$age?>"> 
           <font color="#CCCCCC" size="1">15+ only.</font></td>
          </tr>
          <tr bgcolor="#000000">
            <td align="right" bgcolor="#000000">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="#000000">
<td colspan="2" class="border"><b>Misc:</b> <font color="#CCCCCC">Optional</font></td>
          </tr>
          <tr bgcolor="#000000">
            <td align="right">&nbsp;</td>
            <td>&nbsp;</td>
          </tr>
          <tr bgcolor="000000">
           <td align="right">instant messager:</td>
<td> <select name="messager"><option class="maintxt" <?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";}?>>YaHo O</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 align="right"><strong>Referred By: ( If Referred )</strong></td><td> &nbsp;<? if($refer){ echo"<b>$refer</b><input type=hidden name=refer value=$refer>"; } ?></td>
          </tr>
          <tr bgcolor="000000">
           <td colspan="2" align="center"><br>
<b>You ip address is being logged as: <font color="#FFCC00"><?=$REMOTE_ADDR?></font></b><br>
when signing up yahoo and aol emails dont work to well to get the verify email so id use something else <br></td>
          </tr>
          <?php
          $sagain 
fetch("SELECT ip FROM $tab[user] WHERE ip='$REMOTE_ADDR'");
          
?>
          <?if($sagain){ ?>
          <tr bgcolor="000000">
<td colspan="2" align="center"><strong><font color="ff0000">This "<?=$REMOTE_ADDR?>" ip has already been used, the admins will be alerted as soon as you sign up!</strong></font><br>
            <br></td>
          </tr>
          <? ?>
          <tr bgcolor="000000">
<td colspan="2" align="center"><input type="submit" name="signup" value="signup"> &nbsp; &nbsp; &nbsp; <input type="reset" value="cancel"></td>
          </tr>
         </table>
         <br>
         <input type="hidden" name="hash" value="f7610358ffcc3db6558310ea4a166bcb">
         </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 class="maintxt" style="border:thin inset;background: #000000; 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 class="maintxt">I have read, and agree to abide by the Game Rules.</strong></td>
           <td align="right"><input type="submit" value="next &raquo;&raquo;"></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 class="maintxt" style="border:thin inset;background: #000000; 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">
<span class="maintxt"><strong><nobr>I have read, and agree to abide by the Terms of Service.</nobr></strong></span></td>
           <td align="right"><input type="submit" value="next &raquo;&raquo;"></td>
          </tr>
         </table>
         </form>
         <?}?>
     </td>
    </tr>
   </table>
<?}
sitefooter();
?>
__________________
Serenity Project - 5% (Layout) - Ongoing....
Project Serenity Free Life!....
zxt3st is offline  
Reply With Quote
Reply



Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads
Thread Thread Starter Forum Replies Last Post
SQL Injection and mysql_real_escape_string Durux General 61 01-29-2013 12:20 PM
Venerable methods and the applications they are commonly trusted in. Village Idiot Tips & Tricks 7 11-06-2008 07:36 AM
Sending and Retrieving Data WinSrev Javascript, AJAX, E4X 11 02-18-2008 12:18 AM
The act of sharing your data Wildhoney General 0 12-06-2007 03:31 PM
Tips: PHP security Village Idiot Tips & Tricks 22 11-23-2007 11:17 PM


All times are GMT. The time now is 05:00 AM.

 
     

Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Inactive Reminders By Icora Web Design