0
我目前正在使用联系我们表单发送用户信息给uservoice。我正在使用一个jQuery代码发送一个json请求给用户发音。发送JSON请求到uservoice
下面的代码:
$('#test_form').submit(function(evt) {
evt.preventDefault();
var uvSubdomain = "initech";/
var uvKey = "5JVoVrAGdl4pMkcEkIeIDA";
var message = $('#message').val();
var subject = $('#subject').val();
var name = $('#name').val();
var email = $('#email').val();
$.jsonp({
url: 'https://' + uvSubdomain + '.uservoice.com/api/v1/tickets/create_via_jsonp.json\\?callback=?',
data: {
client: uvKey,
ticket: {
message: message,
subject: subject
},
name: name,
email: email
},
success: function(data) {
alert('Successfully submitted ticket!'); // You might want to redirect the user here, or show a stylized message to them.
},
error: function(d, msg) {
alert("Error");
}
});
return false;
});
现在我想送与PHP的帮助下,JSON请求。
如果您有任何建议或代码,请让我知道。
感谢您
_Now我想发送带有JSON请求PHP的帮助__你的意思是你想要作为json的响应? – itachi