Sending ajax (jquery) post to update user meta
-
Hi, I’m sending a jquery
$.post
function to a php script on my server. The post is going through fine and I can echo back a response of my posted values. However in my php I want to use these values to update user meta, so I’m sending the user id and the meta (the level they have reached in my game) and running these in update_user_meta like this:update_user_meta( $_POST['user_id'], 'level', $_POST['level']);
But it creates an internal server error 500.
Any advise as to why this might be/ what i’m missing would be great!
Thanks,
Jim
Viewing 2 replies - 1 through 2 (of 2 total)
Viewing 2 replies - 1 through 2 (of 2 total)
- The topic ‘Sending ajax (jquery) post to update user meta’ is closed to new replies.