Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to take values from a disabled field to insert?

Tags:

php

I have a form that has input fields that are disabled but none the less it holds values.

How can i take into a variable and insert. I tried:

   $value1 = $_POST['test'];
like image 415
AAA Avatar asked Dec 04 '22 22:12

AAA


1 Answers

You can't. Disabled fields are not posted to your server. Readonly fields are posted, so if you really need the contents of the field you could change it to be readonly instead of disabled.

like image 181
Arjan Avatar answered Dec 10 '22 09:12

Arjan