3XTR3M3 Posted September 6, 2007 Posted September 6, 2007 "; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("Your IP has been banned, there is no way around this. Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why yep its just when i added that class Quote
hamster01 Posted September 6, 2007 Posted September 6, 2007 Re: why There is a problem with your mysql insert query. Please let me know what the column name for the 'class' is. If it is 'class' use the following query; INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, class, gender, signedup, email, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['class']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$ip') Quote
seanybob Posted September 6, 2007 Posted September 6, 2007 Re: why There is a problem with your mysql insert query. Please let me know what the column name for the 'class' is. If it is 'class' use the following query; INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, class, gender, signedup, email, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['class']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$ip') good catch, I missed that when I went over it Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, class, gender, signedup, email, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['class']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$ip') i get this now Parse error: syntax error, unexpected T_STRING in /home/liam/public_html/register.php on line 60 Quote
-Matt- Posted September 6, 2007 Posted September 6, 2007 Re: why lol i would just restore the mccodes login page and start again ;) Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why were talking about a reg page mate now a login Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why there is nothing wrong with it though as soon as i removed from after ip $c); i get that enclasped what ever`` Quote
hamster01 Posted September 6, 2007 Posted September 6, 2007 Re: why Ferdi spoon feeds the kitten(btw. I'm allergic to cats and dogs). <?php session_start(); print "<html> <head> <title>Deaths-City</title> <style> body { font-family:Verdana;font-size:9pt;color: black; background-color:#333333; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: black;text-decoration: none; } table,tr,td { font-size:9pt; } img { border:none; } </style> </head> <body>[img=mybanner.gif] "; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if (file_exists('ipbans/' . $ip)) { die("[b]<font color=red size=+1>Your IP has been banned, there is no way around this.</font>[/b]</body></html>"); } require "mysql.php"; global $c; if ($_POST['username']) { $sm = 100; if ($_POST['promo'] == "Your Promo Code Here") { $sm += 100; } $username = $_POST['username']; $username = str_replace(array("<", ">"), array("<", ">"), $username); $q = mysql_query("SELECT * FROM users WHERE username='{$username}'", $c); if (mysql_num_rows($q)) { print "Username already in use. Choose another."; } elseif ($_POST['password'] != $_POST['cpassword']) { print "The passwords did not match, go back and try again."; } else { $_POST['ref'] = abs((int)$_POST['ref']); $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; $q = mysql_query("SELECT * FROM users WHERE lastip='$ip' AND userid={$_POST['ref']}", $c); if (mysql_num_rows($q)) { die("No creating referral multies. Bad dog."); } if ($_POST['ref']) { $q = mysql_query("SELECT * FROM users WHERE userid={$_POST['ref']}", $c); $r = mysql_fetch_array($q); } mysql_query("INSERT INTO users (username, login_name, userpass, level, money, user_level, energy, maxenergy, will, maxwill, brave, maxbrave, hp, maxhp, location, class, gender, signedup, email, lastip) VALUES( '$username', '$username', md5('{$_POST['password']}'), 1, '$sm', 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_POST['class']}', '{$_POST['gender']}', unix_timestamp(), '{$_POST['email']}', '$ip')", $c); $i = mysql_insert_id($c); mysql_query("INSERT INTO userstats VALUES($i, 10, 10, 10, 10, 10)", $c); if ($_POST['ref']) { require "global_func.php"; mysql_query("UPDATE users SET crystals=crystals+2 WHERE userid={$_POST['ref']}", $c); event_add($_POST['ref'], "For refering $username to the game, you have earnt 2 valuable crystals!", $c); mysql_query("INSERT INTO referals VALUES('', {$_POST['ref']}, $i, unix_timestamp(),'{$r['lastip']}','$ip')", $c); } print "You have signed up, enjoy the game. > [url='login.php']Login[/url]"; } } else { print "<h3>Deaths-City Registration</h3>"; print "<form action=register.php method=post>Username: <input type=text name=username> Password: <input type=password name=password> Confirm Password: <input type=password name=cpassword> Gender: <select type='dropdown' name='gender'><option value='male'>Male</option><option value='female'>Female</option></select> Email: <input type=text name=email> Class: <select name='class' type='dropdown'><option>Criminal</option><option>Mobster</option><option>Assasin</option><option>N/A</option></select> Promo Code: <input type=text name=promo> <input type=hidden name=ref value='"; if ($_GET['REF']) { print $_GET['REF']; } print "'> <input type=submit value=Submit></form> > [url='login.php']Go Back[/url]"; } print "</body></html>"; ?> Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why works great thanks ferdi Quote
-Matt- Posted September 6, 2007 Posted September 6, 2007 Re: why cough u could also thank seany for his help Quote
3XTR3M3 Posted September 6, 2007 Author Posted September 6, 2007 Re: why yep thanks seany join now www.deaths-city.info Quote
hamster01 Posted September 6, 2007 Posted September 6, 2007 Re: why thats better :D why .info Because it is much cheaper. Quote
-Matt- Posted September 6, 2007 Posted September 6, 2007 Re: why lol so .info is sad it like u got it free i want like a .com or .net or .co.uk or summit Quote
hamster01 Posted September 6, 2007 Posted September 6, 2007 Re: why Do you know what the domain suffixes mean? Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.