Ok, here is my code. What it is supposed to do is retrieve the referer that sent you to the page, the user will type someurl.com/refcreate.php?ref=username
&
You're assigning a variable and not comparing it
This refcheck($referer) = false
refcheck($referer) = false
Should be refcheck($referer) == false
refcheck($referer) == false
Also, your method should have a default return if your IF condition fails.