Roach Posted February 8, 2007 Share Posted February 8, 2007 Hi I am sorry if this has already been discussed, I cant seem to find it on the boards..... anyway I have a settings script that saves settings to my config table. I am trying to add a checkbox so I can get a t (true) or f (false) for later referance. The scripting I am trying to place it in is: 'items' => array ( array ( 'type' => 'checkbox', 'name' => 'my_stuff', 'text' => $strMystuff ), all ather variables in other arrays are stored as such: if (isset($this_thingl)) SettingsWriteAdd('this_thing', $this_thingl); if (isset($the_other)) SettingsWriteAdd('the_other', $the_other); Now I have the checkbox on the page all I need to do is have a: if (isset($my_stuff)) SettingsWriteAdd('my_stuff', $what goes here?????); How do i get a checked or not checked and save without a lot more complicated scripting ? Please forgive my ignorance, any help appreciated Link to comment https://forums.phpfreaks.com/topic/37650-check-box-storing-values-to-mysql-help-please/ Share on other sites More sharing options...
Roach Posted February 8, 2007 Author Share Posted February 8, 2007 Would it possible be easier if I had to check boxes: line on and off ? if so how would I tell php if one or another was checked ? like if (isset($my_stuff)) SettingsWriteAdd('$my_stuff', 'checked'); if (isset($my_other_stuff)) SettingsWriteAdd('my_other_stuff', 'checked'); seems like that would be pre defining my_stuff and my_other_stuff as checked allready wouldnt it ? not to mention how to tell if box is actually checked ? Maybe I am kicking a dead cat ? can anyone think of an easier way of adding options (a or b) within the scripting I have other than a check box ? Thanks again, Rochelle Link to comment https://forums.phpfreaks.com/topic/37650-check-box-storing-values-to-mysql-help-please/#findComment-180191 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.