{"action":"opened","issue":{"url":"https://api.github.com/repos/vitalets/x-editable/issues/889","repository_url":"https://api.github.com/repos/vitalets/x-editable","labels_url":"https://api.github.com/repos/vitalets/x-editable/issues/889/labels{/name}","comments_url":"https://api.github.com/repos/vitalets/x-editable/issues/889/comments","events_url":"https://api.github.com/repos/vitalets/x-editable/issues/889/events","html_url":"https://github.com/vitalets/x-editable/issues/889","id":145531330,"number":889,"title":"How to get id of each row so I can update individual members?","user":{"login":"neilb01","id":16904363,"avatar_url":"https://avatars.githubusercontent.com/u/16904363?v=3","gravatar_id":"","url":"https://api.github.com/users/neilb01","html_url":"https://github.com/neilb01","followers_url":"https://api.github.com/users/neilb01/followers","following_url":"https://api.github.com/users/neilb01/following{/other_user}","gists_url":"https://api.github.com/users/neilb01/gists{/gist_id}","starred_url":"https://api.github.com/users/neilb01/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/neilb01/subscriptions","organizations_url":"https://api.github.com/users/neilb01/orgs","repos_url":"https://api.github.com/users/neilb01/repos","events_url":"https://api.github.com/users/neilb01/events{/privacy}","received_events_url":"https://api.github.com/users/neilb01/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2016-04-03T19:15:26Z","updated_at":"2016-04-03T19:15:26Z","closed_at":null,"body":"Here are the relevant parts of my code. I am using a mysql query to fetch all the info and displaying it in a table. Currently the table displays information of all users which is editable. I want to make it so it displays just the userID, username,..., and than have a button which I can click which will take me to a page where I can update all that individual users information. Each row will have a button that can be clicked \r\n\r\n    <td data-th=\"ID\">'.$fetch['userID'].'</td>\r\n    <td class=\"userInfo\" data-th=\"Username\"id=\"'.$fetch['userID'].'\"key=\"username\">'.$fetch['username'].'</td>\r\n    <td class=\"userInfo\" data-th=\"End\" id=\"'.$fetch['userID'].'\" key=\"end_date\">'.$fetch['end_date'].'</td>\r\n\r\nEach row will have this button. I want to be able to click it and have it take me to another page where it lists the individual users info so it can be updated. I am unsure of how to get this done. How can I pass the userID of the row of the user I want to update? \r\n\r\n    <td> <a href=\"updatemember.php\" class=\"btn btn-secondary btn-lg\" role=\"button\">Link</a> </td>\r\n\r\njavascript\r\n\r\n        jQuery(document).ready(function() {\r\n            $.fn.editable.defaults.mode = 'popup';\r\n            $('.userInfo').editable();\r\n            $(document).on('click','.editable-submit',function() {\r\n                var col = $(this).closest('.editable-container').prev().attr('key');\r\n                var x = $(this).closest('.editable-container').prev().attr('id');\r\n                var y = $('.input-sm').val();\r\n                var z = $(this).closest('.editable-container').prev().text(y);\r\n\r\n                $.ajax( {\r\n                    url: \"process.php?id=\"+x+\"&data=\"+y+'&col='+col,\r\n                    type: 'GET',\r\n                    success: function(s){\r\n                        if(s == 'status') {\r\n                            $(z).html(y);\r\n                        }\r\n                        if(s == 'error') {\r\n                            alert('Error.');\r\n                        }\r\n                    },\r\n                    error: function(e){\r\n                        alert('Error.');\r\n                    }\r\n                });\r\n            });\r\n        });\r\n\r\nCode to update each row \r\n\r\n    $col=$_GET['col'];\r\n\t$id = $_GET['id'];\r\n\t$data = $_GET['data'];\r\n\r\n    $pbr = $conn->prepare(\"UPDATE `loginInfo` l\r\n                         INNER JOIN `memberInfo` AS m\r\n                         ON l.userID = m.UserID\r\n                         SET $col = '$data'\r\n                         WHERE m.userID = ?\");\r\n    $pbr->bind_param(\"i\", $id);\r\n    $pbr->execute();\r\n"}}