So, I have the following to update the user meta:
<?php if ( is_user_logged_in() ) { ?>
<?php echo '<input class="input" type="text" id="rhc_phone" name="rhc_phone" placeholder="Phone number" value="' .$current_user -> rh_phone. '"/>' ;?>
<?php update_user_meta( $current_user->ID, 'rh_phone', esc_attr( $_POST['rhc_phone'] ) ); ?>
<?php }else{ ?>
<input class="input" type="text" id="rhc_phone" name="rhc_phone" placeholder="Phone number" value=""/>
<?php } ?>
However when I click submit, there is no value (not even the previous value).
What am I doing wrong?
Thanks!
via Chebli Mohamed
Aucun commentaire:
Enregistrer un commentaire