jszuslik
Forum Replies Created
-
That didn’t work.
I found a solution where I added
$checked = $wpdb->get_results("SELECT
meta_valueFROM ".EM_META_TABLE." WHERE object_id='".$EM_Event->event_id."' AND meta_key='sc_event'");
To the em_smartcard_box function. This is my final code. I also chacnged the check boxed to radio buttons.
function em_smartcard_box() { global $wpdb; global $EM_Event; $checked = $wpdb->get_results("SELECT <code>meta_value</code> FROM ".EM_META_TABLE." WHERE object_id='".$EM_Event->event_id."' AND meta_key='sc_event'"); // var_dump($checked); if ($checked){ foreach ($checked as $check) { if ($check->meta_value == 'Yes'){ $input = ''; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="Yes" checked />'; $input .= ' Yes</label><br>'; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="No" />'; $input .= ' No</label><br>'; echo $input; } elseif ($check->meta_value == 'No'){ $input = ''; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="Yes"/>'; $input .= ' Yes</label><br>'; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="No" checked />'; $input .= ' No</label><br>'; echo $input; } } } else { $input = ''; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="Yes" checked />'; $input .= ' Yes</label><br>'; $input .= '<label>'; $input .= '<input type="radio" name="smartcardevent" value="No" />'; $input .= ' No</label><br>'; echo $input; } }
Basically if I save the checkbox as being checked it is not showing that it is checked when reloaded but in the database it has a value of ‘Yes’
Forum: Plugins
In reply to: [Weather Underground] Weather Widget Stopped UpdatingYou must use the zmw format for the location to get it to update.
For Allegan, Michigan use zmw:49010.1.99999
Forum: Plugins
In reply to: [WP Super Cache] Google PageSpeed Expiration Not SpecifiedYou can add the following code to your .htaccess file through the
File Manager in cPanel or through an FTP application such as CyberDuck or FileZilla (setting up Filezilla) to leverage browser caching (* always back up original files before making any changes*):barnez, I have done what you suggested but still get “expiration not specified” What am I doing wrong? I want to make sure it is working.