Home>
I want to receive and display the stringfy form data, but nothing is displayed.
What is wrong?
$(function () {
$("# send"). on ('click', function () {
var ary_data = {};
ary_data.ID = $('input [name = "id"]'). val ();
ary_data.product = $('input [name = "product"]'). val ();
ary_data.color = $('input [name = "color"]'). val ();
send_data = JSON.stringify (ary_data);
$.ajax ({
type: "POST",
url: ". send.php",
data: send_data,
dataType: "json",
}). done (function (data) {
$("# result"). text (data);
}). fail (function (XMLHttpRequest, textStatus, errorThrown) {
console.log (textStatus);
});
});
});
$json_data = json_decode ($send_data);
$ID = $json_data->ID;
print $ID;
-
Answer # 1
Related articles
- i want to send data from php to mysql
- i want to send json data with mosquitto_pub
- postgresql - rails form_with json type data form
- php - transition of form page does not go well
- how to send arbitrary data to another page php
- i want to send json data from python to html/javascript
- php - inquiry form "required"
- php - how to get multidimensional json data with javascript
- unity php json array
- create an inquiry form with a php file
- php - how to send to bcc address at the same time?
- to send an email with php
- i want to implement a php mail form
- i want to create a form using html and php
- php/laravel json processing
- return to php type with ajax
- php - i can't send emails with gmo vps
- php file send pure white
Related questions
- javascript : reCaptcha v3 will return an error
- javascript : How to connect a custom registration form to the database?
- javascript : The modal window opens only for one record
- php : Ajax, Privat24-api: invalid signature error
- javascript : Best Platform for Site Performance (PageSpeed Insights)
- javascript : Replacing blocks at the touch of a button
- javascript : Refreshing the HTML page
- javascript : Autocomplete input with selectable search?
- javascript : create a service for email verification [closed]
- Passing php variable to javascript
file_get_contents ("php: // input");solved