Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

how can i transfer input data in form with value using GET method

I have a form and it has an input in it. I normally auto-fill this with javascript, but I didn’t add this code because I know the problem is not in javascript. My main problem is that I fill the input using the value from the input and I have to give the input a disabled property. Here is the code:

<form action="testget.php" method="GET">
  <input disabled type="text" name="testget" value="testvalue">
  <button type="submit">Send</button>
</form>

When I press the send button, the url it will redirect me to should be:

localhost/testget.php?testget=testvalue

but here is the problem. The url it redirected me to:

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

localhost/testget.php?

I don’t know if I misunderstood the value property, but how I tried to search on the internet, I could not find a solution for it. I will be glad if you help me.

I was trying and expecting for the data in the form to be transferred to testget.php.

>Solution :

try to make the `disabled` part to `readonly` in your code

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading