I have a page showing a random picture on each reload. This page only displays if a number is passed through $_GET (represents a user profile). To go to the next random picture I'd like a submit button to simply reload the page. However, I'm hitting two snags:
- In PHP using the
header
function produces the infamous "headers already sent by" error. Plus the user is redirected because no parameter is passed. - In Javascript, a
location.reload
does reload the page but, again, the parameter is missing leading to the same result.
So my question is whether it is possible in Javascript to reload a page with a parameter? Or do you know of another solution?
Edit: Did some tests with an alert box and the url shows up as it appears in the adress bar. No idea why the parameter isn't being passed.