$("#new_note").submit();
window.location.href='./thankyou.php?usr_id=<?php echo $_SESSION['pid'>';
Hi, this is a simple code for submitting a form and then redirect to a thank you page. It actually does the redirecting part but the form is not submitted
I guess it redirects before the submit is completed, how can it be avoided?
Do not redirect via JavaScript but make the page you submit your form to redirect to the “thanks” page.