modifying query string with no page refresh

Posted on 16th Feb 2014 by admin

Hi everybody,
I've tried to get info about my problem all over the internet but i didn't find out what I need.
The question is: how can I modify the querystring in PHP with no page refresh?
Facebook uses this feature in its images gallery. E.g. When you click on next photo, the query string changes (using Ajax I suppose) and it shows a new photo without refreshing the whole page. The Ajax appends an anchor (#) and the values od the required photo to the url.
I am building an image gallery that works this way:
1) Clicking on thumbnails on thumb page you reach a page called display.php with the enlargement of the required photo and links for next and previous image.
2) Actually, clicking on next and prev, the whole page is being refreshed. I'd like to avoid that using the fb's solution for its gallery.
Thanx in advance

Other forums