Answer the question
In order to leave comments, you need to log in
Why can't I log in using dle.api?
Hello. I have a php file like this:
<?php
include ('engine/api/api.class.php');
$request = $dle_api->external_auth( $_POST['ajaxname'], $_POST['ajaxpass']);
if ($request == true)
echo 'Вы успешно Авторизировались';
elseif ($request == false)
echo 'Ошибка! Логин или пароль не совпали!';
$(function(){
$('#ajaxlogin').on( "submit", function(e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "ajaxlogin.php",
data: $('#ajaxlogin').serialize(),
success: function(data){
alert(data);
}
});
});
});
Answer the question
In order to leave comments, you need to log in
the fact is that on the server side it is not enough to make sure that the password is correct. It is also necessary to write certain values to the session, by which the engine recognizes that the user has logged in. Log in via the login form and display the contents of the $_SESSION array
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question