1

How do I change the current URL with jQuery without reloading the page (to add parameters) so that I can use $_GET[''] in PHP.

Basically, I have a form and I want the user inputs to go to the URL as parameters instead of using the usual $_POST['']. I don't want to use post because I want it to work if the user reloads the page or goes to another page then goes back to this page.

I don't want to reload the page because I have some ajax stuff going on for animations and a reload would interfere with that.

Andrew
  • 103
  • 7

2 Answers2

1

somebody had made a plugin named jquery-pjax or pure javascript pjax

worldask
  • 1,837
  • 3
  • 22
  • 37
0

There's option history.pushState('', 'Title', newHREF); but i don't think you can use $_GET[] after change the url.

Modify the URL without reloading the page

Community
  • 1
  • 1
Supun Praneeth
  • 3,087
  • 2
  • 30
  • 33