I want to stay same modal after submitting this form genarateBarcode.php: savegenarateBarcode.php: how can I stay same genarateBarcode.php(modal) after submiting this form? Answer I think you should use ajax because the form submit method reload the page.