Clearing a GET value from URL

How do you clear a GET value from the URL? I have my code to look at the error code that is in the URL, but if CLEAR is selected or they go from the sign-up page to the login page the GET value persists and won’t clear out.

Example: The error=emptyinput needs to not show in the URL otherwise it will show the error that belongs to “emptyinput” as an error in the form.


The only way to add a GET value to your URL is to type it in or follow a link which has it. Check your output html, see if the links have the GET value there.

yeah I added the error-emptyinput to trigger an error if a user doesn’t enter anything in the form. Once there is there no way to clear it out? Would there be a better way to do this instead?

Check for form content instead of the url?

@astonecipher How do you do error handling by looking at the form instead of the URL? I am looking at the submit buttons by the name, so something like that with an if/else statement?

Sponsor our Newsletter | Privacy Policy | Terms of Service