update_user_meta() does not work

You set the variable $user before you created this user.. It should be like this and you need to check if the user already exists $user = get_user_by(“email”, $email); // Its return you the user object if($user) { update_user_meta($user->ID, “quiz_scores”, $score); } else { $user_id = register_new_user($email, $_SESSION[“email”]); update_user_meta($user_id, “quiz_scores”, $score); }

WP_Session not acting with AJAX

I think in your code you must add this line for ajax acting jQuery.ajax({ type : ‘POST’, url : ‘<?php echo admin_url(‘admin-ajax.php’); ?>’, data : { action : ‘vg_show_post_id’, post_id: $post_id, data-id: true }, ),

Share session between my site and WP blog [closed]

You can do this in your init or config file. ini_set(‘session.cookie_domain’, substr($_SERVER[‘SERVER_NAME’], strpos($_SERVER[‘SERVER_NAME’],”.”), 100)); Whenever PHP sets the ‘PHPSESSID’ cookie, the cookie will be available to all over the site including Blog.

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)