I've got a button on my website posts to a PHP page. I can't seem to make my PHP code update the user meta data for the currently logged in user. The page is intended to allow users to change a specific meta key upon pressing the button. Does anyone know what I'm doing wrong? Any help is greatly appreciated.
<?php
if(isset ($_POST ['go']){
$user_ID = $current_user->ID;
$CustomMeta = "4";
update_user_meta($user_ID, 'CustomMeta', $CustomMeta);
}
?>