Quote:
Originally Posted by ziggy786
. . . Since i added JQuery Post it doesn't work.
|
Indicating a problem with the JQuery, and not that of PHP. If it worked before adding the JS, the server is capable of processing properly, and its the JS that's not sending the proper data.
PHP wise, you obviously don't want to be hard coding a string into the user_exists function call. There's also a another discrepancy here:
PHP Code:
if (user_exists('super')){ //user_exists() = a user defined function in config.php
return true;
}
You are returning in the dummy main. That may carry no value depending on usage; given what I see here, you should be printing true, not returning it.
I don't do JS programming, but these sure stand out as a problem:
username: username, password: password.
Fix up the PHP code first, than fix up the JS.