mgd_update_preference

(Midgard 1.4.2 'Bifrost')

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.<br>";
   echo "reason: " . mgd_errstr( $err );
 } else {
   echo "Updated preference.";
 }
?>