WordPress.org

Ready to get started?Download WordPress

Forums

WP Code is not writing to MySQL (3 posts)

  1. madusha
    Member
    Posted 1 year ago #

    I was trying to add some more features to one of my WP codes. So I created few columns under "wp_usermeta" and modified my php code as follows:

  2. <h2><?php echo __('Linkedin Profile','MyTheme'); ?>:</h2>
    <p><input type="text" size="35" value="<?php echo get_user_meta($uid,'user_linkedin_url',true); ?>" name="user_linkedin_url" class="do_input" /></p>
  3. So under "wp_usermeta" I created a row, and entered "user_linkedin_url" for meta_key and left everything else blank. When I manually enter a value (i.e. to meta_value) the site is able to pull that info, but it is not letting my write anything to the database.

    Not sure what I am doing wrong

  • rachelbaker
    Member
    Posted 1 year ago #

    Are you using wp_update_meta to create/add content to the meta key?
    http://codex.wordpress.org/Function_Reference/update_post_meta

  • madusha
    Member
    Posted 1 year ago #

    your right... thanks

  • Topic Closed

    This topic has been closed to new replies.

    About this Topic

    Tags

    No tags yet.