There you have it: http://pastebin.com/krHbwJUY
Printable View
There you have it: http://pastebin.com/krHbwJUY
It displays a blank white page but when I reload the page it displays "This would not work"
It also adds the registered user to the database.
Does exactly the same with or without those lines.
- - - Updated - - -
I think the problem is something to do with this code:
if(!empty($_SESSION['refer'])){
$execute = $db->query("UPDATE users SET refer_count = refer_count + '1' WHERE username = '".$this->filtertext($_SESSION['refer'])."' LIMIT 1");
}
header("LOCATION: ". PATH ."/me.php");
return true;
or this code:
if(!empty($_SESSION['refer'])){
$execute = $db->query("UPDATE users SET refer_count = refer_count + '1' WHERE username = '".$this->filtertext($_SESSION['refer'])."' LIMIT 1");
}
header("LOCATION: ". PATH ."/me.php");
return true;
Ok so ive done a bit more testing and im pretty certain that the error im getting is to do with the following code:
$execute = $db->query("UPDATE users SET refer_count = refer_count + '1' WHERE username = '".$this->filtertext($_SESSION['refer'])."' LIMIT 1");
When I remove the code in red from the code above and change it to mysql_query, it doesn't freeze on the register_submit.php but it also doesn't reward referral point.
It could also be the following code:
if(!empty($_SESSION['refer'])){
I tried changing this to numerous things without luck such as: if(!isset($_SESSION['refer'])){
Please help as ive been trying to get this to work for 3 days straight now, willing to make you administrator/manager on my hotel when its live if you help me solve this problem. Thank you!
- - - Updated - - -
I just forced PHP to show me the errors and it displayed this:
Notice: Undefined variable: db in C:\xampp\htdocs\inc\functions.php on line 438
Fatal error: Call to a member function query() on null in C:\xampp\htdocs\inc\functions.php on line 438
- - - Updated - - -
Thread continued here: http://forum.ragezone.com/f333/help-referral-system-errors-1050313/