array (size=0)
empty
$(document).ready(function (){
$("#send").click(function() {
$.ajax({
method: "post",
url: "register.php",
data: {name: $("#name").val(), phone: $("#phone").val()},
cache: false
})
})
});
<form >
<input type="text" id="name" placeholder="имя" />
<input type="text" id="phone" placeholder="телефон" />
<button id="send">Send</button>
</form>
echo $_POST['name'];
echo $_POST['phone'];
Request URL:http://127.0.0.2/p.ukr/js/ajax.js
Request Method:GET
Status Code:200 OK (from disk cache)
Remote Address:127.0.0.2:80
Response Headers
Accept-Ranges:bytes
Content-Encoding:gzip
Content-Length:1481
Content-Type:application/javascript
Date:Wed, 19 Jul 2017 13:19:48 GMT
ETag:"11aa-554ab4c1ec0c7-gzip"
Last-Modified:Wed, 19 Jul 2017 13:06:16 GMT
Server:Apache/2.4.18 (Ubuntu)
Vary:Accept-Encoding
Request Headers
Provisional headers are shown
Referer:http://127.0.0.2/p.ukr/
User-Agent:Mozilla/5.0 (X11; Linux i686) AppleWebKit/537.36 (KHTML, like Gecko) Ubuntu Chromium/55.0.2883.87 Chrome/55.0.2883.87 Safari/537.36
Name
ajax.js