Почему это не работает? Я пытаюсь отправить данные на сервер через AJAX, но они там не отображаются.
Консоль просто регистрирует abc
, никаких признаков 123
.
Вызов AJAX
var xmlhttp = new XMLHttpRequest();
xmlhttp.onreadystatechange = function () {
if (this.readyState == 4 && this.status == 200) {
console.log(this.responseText);
}
};
xmlhttp.open("GET", "includes/process_login.php?email=123", true);
xmlhttp.send();
и _process_login.php_:
<?php
include_once 'db_connect.php';
include_once 'functions.php';
sec_session_start(); // Our custom secure way of starting a PHP session.
echo($_GET['email']."abc");
exit();