Open Source Content Management Framework

mgd_update_preference

  1. Description

mgd_update_preference -- Update a preference

Description

`bool **mgd_update_preference** (int preference, string value)`

Minimum version: Midgard 1.4 (Bifrost)

Updates the preference record with id id to value value.

Returns TRUE if successful. Returns FALSE on failure.

<?php
     $pref  = 13;
     $value = "blue";
     mgd_update_preference( $pref, $value);
     if( $err = mgd_errno() ) {
       echo "Failed to update preference.
"; echo "reason: " . mgd_errstr( $err ); } else { echo "Updated preference."; } ?>
Designed by Nemein, hosted by Anykey