WordPress.org

Ready to get started?Download WordPress

Forums

add_post_meta fails with string variables (2 posts)

  1. mscheland
    Member
    Posted 3 years ago #

    hi there - I#m kind of going crazy with a small problem.
    In my plugin i call update_post_meta($post_id, $field['id'], $new); - it's working fine on one machine. but on the other machine the string in ´$new´ won't be added to the database. It seems like no strings (ASCII) from a variable are added. If I change the value to an integer or just adding a string like this 'string' - it's all fine.

    Running WordPress 3.1.2 fresh installation on mySQL 5.1.41
    Any suggestions?
    Thanks!

  2. mscheland
    Member
    Posted 3 years ago #

    it seems like the problem is $new = $_POST[$field['id']];.
    Any other string variables are working...

Topic Closed

This topic has been closed to new replies.

About this Topic

Tags

No tags yet.