0

I'm trying to create a plugin for Wordpress and in the plugin, I am using the Get method to store a string which I will use to call an API. I created a custom page and the url is: http://localhost/wordpress/explorer/. When using the get method in a contact form, the URL becomes http://localhost/wordpress/explorer/?value=inputvalue where input value is the value I inserted into the form. To make the URL look nicer, I want to removed the question mark before inputvalue and make the url something like this http://localhost/wordpress/explorer/value/inputvalue. How can I do that?

I don't want to use the post method since I want the input value to be in the URL.

  • Transmitting form data through get requests is pretty dangerous. You can read all over the internet why. Values can be manipulated on the fly in the url and can end up in your database doing bad stuff. – user3135691 Apr 25 at 15:49
  • Thanks but the actual data itself will not be inserted into the database. The reason for using the Get method is so people can edit the input using the URL as well as the input form. The input value is used as a value for an API and then, the API will return the relevant information and display it on the page. The plugin itself will not insert or edit anything in the database. There is also no sensitive data transmitted with the plugin. I know that all sensitive data should transmitted using the post method. – MasterA Apr 25 at 16:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.