My checkbox in the admin area is working half way.
-
I am trying to add a checkbox into the admin area so that when you click the box, it will display some html. when you uncheck it, the html goes away. I got the checkbox in the admin area, but I can’t get the content on the index page.
my checkbox in the array
array( "name" => "Feedburner: ", "desc" => "Display feedburner on the homepage", "id" => $shortname."_feedburner", "std" => "", "type" => "checkbox"),
my checkbox in the form
<td width="20%" rowspan="2" valign="middle"><strong><?php echo $value['name']; ?></strong></td> <td width="80%"><?php if(get_settings($value['id'])){ $checked = "checked=\"checked\""; }else{ $checked = ""; } ?> <input type="checkbox" name="<?php echo $value['id']; ?>" id="<?php echo $value['id']; ?>" value="true" <?php echo $checked; ?> /> </td>
at the top of my page I am getting the options
<? global $options; foreach ($options as $value) { if (get_settings( $value['id'] ) === FALSE) { $$value['id'] = $value['std']; } else { $$value['id'] = get_settings( $value['id'] ); } }
I tried many different ways to get the results
if($church_feedburner == "true") if($church_feedburner) if($church_feedburner = $checked)
what am I doing wrong. I noticed that the value does show up in the database. But when I uncheck the box, the value disappears. How can I make the value say false instead of leaving the database all together
Viewing 1 replies (of 1 total)
Viewing 1 replies (of 1 total)
- The topic ‘My checkbox in the admin area is working half way.’ is closed to new replies.