Answer the question
In order to leave comments, you need to log in
Why is the ajax form not working?
I have an html form:
<form id="mt_forms" action="https://money.yandex.ru/eshop.xml" method="post">
<input>...
...
<input type="submit" class="submitting" value="Оплатить">
</form>
$(function () {
$('form').on('submit', function (e) {
e.preventDefault();
$.ajax({
type: "POST",
url: "/form_sent.php",
data: $('form').serialize(),
// async: false,
success: function() {
return true;
}
});
});
});
Авторизация прошла успешно<pre>NULL
</pre><pre>NULL
</pre>
Answer the question
In order to leave comments, you need to log in
// http://site.ru/post?id=1&value=2
$id = $request->get('id'); // 1
$value = $request->get('value'); // 2
$array = $request->all(); // ['id' => 1, 'value' => 2]
Request: dipl/test=2Forgot about the sign "?". Correct would be: dipl/ ? test=2
Input::get('number') returns null.You pass the parameter to test, but you get number? No wonder it will be null)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question