php – how to remove a query arguments from all site urls?

Question

I use url query arguments to display messages ether errors or info messages

for example i use https://www.example.com?error=myerrormessagegoeshere

or https://www.example.com?success=mysuccessmessagegoeshere

and i display the message but the problem is when i refresh the page the message will still appear because the query is still there so i need to remove that query from the url
i know that in wordpress

remove_query_arg( string|string[] $key, false|string $query = false )

is used for that but i cant have do what i want

thanks in advance .

0
Mourad ELCADI 2 months 2021-03-21T05:36:52-05:00 0 Answers 0 views 0

Leave an answer

Browse
Browse