A serious curl checkbox problem
I have a serious problem that i couldnt managed to solve.
I'm writin a PHP program that manages an optical switch. I'm gettin the data from the switch with curl and modifying some switch settings with curl post. In the curl post section everything is good except the checkbox thing. As far as i understand the switch wants some 1-0 value for the checkbox but it may be different as well since for some other variables, it sometimes accepts some other string values so i cannot be sure. I can set the value to the switch if the checkbox is checked but for an unchecked post it does not set the checked value as unchecked. I just look for the
Can you help me in this problem please?
You can always check if the GET/POST item is set or not. If it is set then it's been checked, otherwise it's not been checked. An alternative would be to supply a hidden attribute before the check box. That way if the check box is not checked, the value will be taken from the hidden element, otherwise if it is checked, the priority ordering will consider the second element with the same name to be the correct one.
Something like the following:
And of course the PHP to go along with it:
|All times are GMT. The time now is 05:32 AM.|
Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0