Codes?

All code and questions for Urban Realms, Forsaken Sanctum, ect...
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Codes?

Post by mikecheer101 »

where are the codes for urban realms?
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

lol i found it.
it was with the download lol.
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

i dont know why but when i click register i get an error
heres the code

Code: Select all

<?php
parse_str("$QUERY_STRING");

$db = mysql_connect("localhost", "root", "NEWPASSWORD") or die("Could not connect.");
if(!$db) 
	die("no db");
if(!mysql_select_db("urbanrealms",$db))
 	die("No database selected."); 
if(!get_magic_quotes_gpc())
{
  $_GET = array_map('mysql_real_escape_string', $_GET); 
  $_POST = array_map('mysql_real_escape_string', $_POST); 
  $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
else
{  
   $_GET = array_map('stripslashes', $_GET); 
   $_POST = array_map('stripslashes', $_POST); 
   $_COOKIE = array_map('stripslashes', $_COOKIE);
   $_GET = array_map('mysql_real_escape_string', $_GET); 
   $_POST = array_map('mysql_real_escape_string', $_POST); 
   $_COOKIE = array_map('mysql_real_escape_string', $_COOKIE);
}
?> 


heres the error

Notice: Undefined variable: QUERY_STRING in C:\wamp\www\urban\connect.php on line 2

Warning: mysql_connect() [function.mysql-connect]: Access denied for user 'root'@'localhost' (using password: YES) in C:\wamp\www\urban\connect.php on line 4
Could not connect.
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Codes?

Post by hallsofvallhalla »

change the password from 'NEWPASSWORD' to '' in other words deleete the password if you never set one up in wamp.
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

Thank You! :D
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

i still have this error


Notice: Undefined variable: QUERY_STRING in C:\wamp\www\urban\connect.php on line 2
User avatar
hallsofvallhalla
Site Admin
Posts: 12023
Joined: Wed Apr 22, 2009 11:29 pm

Re: Codes?

Post by hallsofvallhalla »

delete this line

Code: Select all

parse_str("$QUERY_STRING");
i am uploading fixed code within the next five minutes. I had to make the code compatible to all environments. It works on half and doesnt on the other half due to different systems...go figure..anyways uploading the fixed code now :)
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

k thanks :D
mikecheer101
Posts: 8
Joined: Sun Dec 27, 2009 3:30 pm

Re: Codes?

Post by mikecheer101 »

now i have errors saying
Notice: Undefined index: shid in C:\wamp\www\urban\index.php on line 373
Notice: Undefined index: pid in C:\wamp\www\urban\index.php on line 374
Notice: Undefined variable: bypassmap in C:\wamp\www\urban\index.php on line 363
Notice: Undefined index: pclass in C:\wamp\www\urban\statpanel.php on line 7
User avatar
Noctrine
Posts: 928
Joined: Thu Apr 23, 2009 9:57 pm

Re: Codes?

Post by Noctrine »

Those aren't errors, they are notices.

Its what happens when you don't check if a variable exists before trying to call it. Bad in the sense that they expose information about how the site runs (not totally valuable information but information nonetheless)

You can hide them by not setting the error reporting to E_ALL

or you can fix the problem by doing an isset check before assigning a variable.
Jesse Dorsey
ProjectANI - Lead Developer Person
http://about.me/jessedorsey
Post Reply

Return to “Hall's Games”