I'm looking for some pointers and/or some example code to overcome the following:
I have a php page (page1.php) that uses some ajax to present a div to a user when a button is clicked. The div contains some .php code (present as page2.php) to update some MySQL database data via a form contained within it.
Everything works as it should, however when i click to submit the form within page2.php my browser is redirect to page2.php and consequently the updated data.
I would like the browser to remain at page1.php, and only for the contents of the div to be updated with the new contents of page2.php.
How can i go about this?