Login Register


Help with Updating database from PHP? filter_list
Author
Message
RE: Help with Updating database from PHP? #21
(07-28-2016, 05:52 AM)mudrig Wrote: That worked. Looks like I just had the parameters backwards on that.

Now one more question since you have been so helpful. How would I make this form after submitted go back to same page and Display above form the result from the action of the form submit.

Awww yeah Biggrin That's great...

In order to do that you'll have to submit the page via Ajax, I haven't tested the code but here it is according to your form
Code:
<script type="text/javascript"> $(document).ready(function() {       $('form').submit(function(e){                    $.ajax({                 type: 'post',                 url: 'user_rank_change.php',                 data: $('form').serialize(),                 success: function(result) {                        alert(result);                 }            });            e.preventdefault(); //Doesn't allow page to refresh       }); }); </script>

Paste this code after your </body> tag and tell me if any error comes or it works
My Blog: http://www.procurity.wordpress.com
Donations: 1HLjiSbnWMpeQU46eUVCrYdbkrtduX7snG

Reply





Messages In This Thread
Help with Updating database from PHP? - by mudrig - 07-27-2016, 07:50 PM
RE: Help with Updating database from PHP? - by Ex094 - 07-28-2016, 06:40 AM



Users browsing this thread: