CraigF Posted June 9, 2007 Posted June 9, 2007 OMG, upto userid 17 it was fine but now if i go on anyone with the id 18+ the viewuser is screwed, i get these errors un the profile: Referals: Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 90 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 94 Warning: mysql_num_rows(): supplied argument is not a valid MySQL result resource in /home/fallen/public_html/viewuser.php on line 95 and they dont have an ID in it. its just THEIRNAME [] line 90-96 Referals: "; $rr=mysql_query("SELECT * FROM referals WHERE refREFER={$r['userid']}",$c); mysql_num_rows($rr); $q_y=mysql_query("SELECT * FROM friendslist WHERE fl_ADDED={$r['userid']}",$c); $q_z=mysql_query("SELECT * FROM blacklist WHERE bl_ADDED={$r['userid']}",$c); print " Friends: ".mysql_num_rows($q_y)." Enemies: ".mysql_num_rows($q_z)." Quote
Decepti0n Posted June 9, 2007 Posted June 9, 2007 Re: WTF 1) they dont have any referrals at a guess, or there was an error 2) they dont have any friends 3) they dont have any enemies I'd say, try adding a friend or so to see if it helps any Quote
CraigF Posted June 9, 2007 Author Posted June 9, 2007 Re: WTF ive added a friend, it comes the same :( its all fine up to ID 18+ Quote
Decepti0n Posted June 9, 2007 Posted June 9, 2007 Re: WTF I signed up and i have errors all over, and no userid Name: gooey [] Money: $100 Level: 1 Crystals: 0 So, i'd say you changed something in the one of the user tables, and now when registering it wont insert properly Quote
CraigF Posted June 9, 2007 Author Posted June 9, 2007 Re: WTF its a new game there is bound to be errors lol. do you know how to solve this? it happened before and i reset the game and it worked but i dont want to do that as i have 2 donaters and aload of members and i have reset twice so dont want to disturb them Quote
Matty Posted June 9, 2007 Posted June 9, 2007 Re: WTF Backup your database. Then take the site down sort out the register.php page (if thats causing the problem like deception said) Then test. If all is okay take out all the incomplete signups and then reopen. If you mess up you still have that backup ;) Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF it happens when i create one though Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF bump, (solar is posting loads ao i am bumping so it doesnt go out of the screen) Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF What version of mccodes are you using?? Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF v1, i think it must be the database as its the same if i create a ser in admin panel Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF when you view a user can you see staff notes if not the query for users may not have finished properly Quote
Matty Posted June 10, 2007 Posted June 10, 2007 Re: WTF Check that all your fields correspond. Have you edited the register.php file recently? If you havnt then it would be that your fields in the database are messed, perhaps your missing one, deleted by accident. I suggest you check that there all there and are correct. Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF If it is an error in register.php This Register page is excellent <?php session_start(); print "<html> <head> <title>Crime-city</title> <style> body { font-family:Verdana;font-size:9pt;color: white; background-color:#000000; scrollbar-base-color: #005B70; scrollbar-arrow-color: #F3960B; scrollbar-DarkShadow-Color: #000000; } a:visited,a:active,a:hover,a:link { color: blue;text-decoration: none; } table,tr,td { font-size:9pt; } img { border:none; } </style> </head> <body><table width='100%' border='1' bgcolor='#000000'> <tr> <th scope='col'></th> </tr> </table> Â Â <center> "; $ip = ($_SERVER['HTTP_X_FORWARDED_FOR']) ? $_SERVER['HTTP_X_FORWARDED_FOR'] : $_SERVER['REMOTE_ADDR']; if(file_exists('ipbans/'.$ip)) { die("<font color=red size=+1>Your IP has been banned, there is no way around this.</font></body></html>"); } require "mysql.php"; global $c; if($_POST['username']) { $sm=100; if($_POST['promo'] == "908") { $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."; } else if($_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); $a=mysql_query("SELECT * FROM users WHERE lastip='$ip'",$c); if(mysql_num_rows($a) > 0) { die("No multi's! Your not trying to make another account are you! Sorry! Not Allowed!"); } if(mysql_num_rows($q)) { die("Creating Referral Multies Is Not Aloud."); } 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, gender, signedup, email, lastip) VALUES( '{$username}', '{$username}', md5('{$_POST['password']}'), 1, $sm, 1, 12, 12, 100, 100, 5, 5, 100, 100, 1, '{$_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 "Thank You For Registering! Please Login. > Login"; } } else { print "<style type='text/css'> <!-- #Layer2 { position:absolute; width:200px; height:115px; z-index:1; left: 354px; top: 356px; } #Layer6 { position:absolute; width:182px; height:202px; z-index:2; left: 10px; top: 204px; } #Layer7 { position:absolute; width:200px; height:115px; z-index:3; left: 350px; top: 201px; } #Layer8 { position:absolute; width:1081px; height:33px; z-index:4; left: 71px; top: 590px; } --> </style> <body bgcolor='#000000'> <div id='Layer7'> <table width='530' height='109' border='1' bgcolor='#000000'> <tr> <th scope='col'> Crime-city Registration</th> </tr> <td> <center> <form action=register.php method=post> <table width='530' border='1'> Â <td><div align='center'>Username:</div></td> <td><div align='center'> <input type='text' name='username' /> </div></td> </tr> <tr> <td><div align='center'>Password:</div></td> <td><div align='center'> <input type='password' name='password' /> </div></td> </tr> <tr> <td><div align='center'>Confirm Password: </div></td> <td><div align='center'> <input type='password' name='cpassword' /> Gender: <select type='dropdown' name='gender'><option value='male'>Male</option><option value='female'>Female</option></select> Â </div></td> </tr> <tr> <td><div align='center'>Email Address: </div></td> <td><div align='center'> <input type='text' name='email' /> </div></td> </tr> <tr> <td><div align='center'>Promo Code: </div></td> <td><div align='center'> <input type=text name=promo /> </div></td> </tr> <tr> </tr> </table> <input type=hidden name=ref value='"; if($_GET['REF']) { print $_GET['REF']; } print "'> <input type=submit value=Submit></form><form name=tos> <input type='checkbox' name=mybox value='1'>I Agree To The Terms Of Service </form> </center></td> </tr> </table> </div> <div id='Layer6'> <table width='181' height='203' border='1' bgcolor='#000000'> <tr> <th height='39' scope='col'>Navigation</th> </tr> <tr> <td height='30'>Login</td> </tr> <tr> <td height='28'>Register</td> </tr> <tr> <td height='30'>Lost Password?</td> </tr> <tr> <td height='30'>Screenshots</td> </tr> <tr> <td height='30'>Terms Of Service</td> </tr> </table> </div> <div id='Layer8'> table width='98%' border='1' bgcolor='#000000'> <tr> <th scope='col'><center> | This Game Is Brought To You By solar! | </center>"; } print "</body></html>"; ?> Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF thats my viewuser.php it cant be register as when i create a new person with my admin panel it doesnt work Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF from that picture i think its proberly somthing to do with view user u seem to have a lot of links maybe one of them inturruptus a command (just guessing) maybe you should upload a new viewuser.php that you havnt edited and see what happens Quote
Decepti0n Posted June 10, 2007 Posted June 10, 2007 Re: WTF What's in your users table for <17, and 18> Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF from that picture i think its proberly somthing to do with view user u seem to have a lot of links maybe one of them inturruptus a command (just guessing) maybe you should upload a new viewuser.php that you havnt edited and see what happens ive tried that. What's in your users table for <17, and 18> by that you mean? Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF What about a error in global_func like something might be wrong with function user_dropdown($connection,$ddname="user",$selected=-1) { $ret="<select name='$ddname' type='dropdown'>"; $q=mysql_query("SELECT * FROM users ORDER BY username ASC",$connection); if($selected == -1) { $first=0; } else { $first=1; } while($r=mysql_fetch_array($q)) { $ret.="\n<option value='{$r['userid']}'"; if ($selected == $r['userid'] || $first == 0) { $ret.=" selected='selected'";$first=1; } $ret.= ">{$r['username']}</option>"; } and what happens when you go on user list (just wondering) Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF userlist shows it working fine, just viewuser is effected Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF hmmm :? maybe a problem with the original user list and have you tryed uploading the original global_func Quote
Decepti0n Posted June 10, 2007 Posted June 10, 2007 Re: WTF It was the entire game when i logged in :p Say, whats the info from the users table for ID 16, and what is it for something higher than 18, might be able to spot something Quote
solar Posted June 10, 2007 Posted June 10, 2007 Re: WTF Seems like quite a few poeple are posting in here so im gonna ask a qeuestion how to i start a topic :P Quote
CraigF Posted June 10, 2007 Author Posted June 10, 2007 Re: WTF Say, whats the info from the users table for ID 16, and what is it for something higher than 18, might be able to spot something how do i find that out? Seems like quite a few poeple are posting in here so im gonna ask a qeuestion how to i start a topic :P you click "start new topic" at the top of the thread, (not this one, the DBS Support thread) 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.