Originally Posted by
Freezing Process
You're doing it wrong.
This part;
Code:
$tmp = CheckEuLogin($_REQUEST['username'], $_REQUEST['password']);
echo $tmp;
In the code you're posting, you're running
CheckEuLogin before the function is set.
Check out how I added the checking part;
http : // sophonax.com/phis.phps
Run the code here;
http : // sophonax.com/phis.php?username=yourusername&password=yourpassword
Works fine with me.
The great part about PHP, the function doesn't need to be defined first if it's in the same file.
I.E: Do the same, but add an echo "In a function<br />"; in the CheckUsername, CheckPassword, and CheckAccount functions. You'll see there's no problem calling them.
Also, you still didn't do what I told you to.
Change
Code:
if (strstr($returnedPage, "Invalid account name or password"))
{
return "FAIL: Invalid account name or password";
}
else
{
return "SUCCESS";
}
To
Code:
if (strstr($returnedPage, "Invalid account name or password"))
{
return "FAIL: Invalid account name or password";
}
else
{
return $returnedPage;
}
You'll see your output is NOT what you think it is. (Keep in mind, it's only checking if the page contains "Invalid account name or password".)