I have url like this http://localhost/join/prog/ex.php
When i use GET method the url address like this http://localhost/join/prog/ex.php?name=MEMORY+2+GB&price=20&quantity=2&code=1&search=add
My question is :
so, I still use the GET method but I want to after processing in GET method is finished, I want to the url back(remove parameter) into http://localhost/join/prog/ex.php
, as previously (not using POST method). How can i do it?
Put this in your HTML file (HTML5).
Or using a backend solution using a session for instance;
If you're using apache, consider using a .htaccess file with mod_rewirte. Here a quickstart. I think this result can be obtained on iis as well with web.config file
SIMPLE ANSWER
Just place this in the top of the file you need to make the GET querys disappear from the browser's URL bar after loading.
i guess after calling the url you want to redirect to the file ex.php , but this time without any parameters. for that try using the following code in ex.php
here what u did id just redirect redirect to the same page without checking if any parameter is there in the query string. the code intelligently checks for the presence of parameters, id any parameters are there it will redirect to ex.php else it will print "Hi no parameters present!" string!