Stuck with a jquery ajax form submission! Here's the code snippet:
jsPageID = " .$page_id. ";"; ?>
jsUsername = '" .$_SESSION['username']. "' ;"; ?>
**Now here's the PHP code:**
Now, when I try executing the above code, the form "sometimes" gets submitted to db. I cant think of a reason for why the "sometimes".
Also, there is some data that is getting appended to the url somehow, after the request is processed. Example: If the original url of the webpage, before making the ajax request is something like "page.html?id=6" then, on executing the ajax request, the page url gets appended as below:
"page.php?id=6&submit-minus=" (if the submit-minus button was used for invoking the ajax request)
I do not understand why the submit-minus thing is getting appended to the url, and also whey only rarely the data is getting inserted successfully to the db.
Thanks for your time.
以上就是why is url getting appended upon a ajax request using jquery form submission?的详细内容，更多请关注web前端其它相关文章！