I have a site that is a single base page that loads content based on get variables. The problem is, is that whenever a form is submitted, the url is cleared of all variables and the form data is never handled. How do you keep the url from reverting back to its base when a form is submitted?

8 Years
Discussion Span
Last Post by cloud09

get the url paramaters and repaste them into the form action attribute.

THis will give you your parameters:

echo parse_url($url, PHP_URL_QUERY);

If you need to re-encode the params - look at urlencode()

I would say that you should validate the parameters at each step as they could be tinkered with.

Edited by diafol: n/a

This question has already been answered. Start a new discussion instead.
Have something to contribute to this discussion? Please be thoughtful, detailed and courteous, and be sure to adhere to our posting rules.