Strange mixture of javascript and php!??!
Javascript is client-side and cannot update your db. PHP is server-side and cannot be scripted on the client.
Use a Form and Post the data to your php update script, Post does not display the data in the url, so it looks much neater and is harder for the user to tamper with the data.
If you want a confirmation before sending then use 'onsubmit="return urlreport();"' in the form tag to call your javascript function and return true or false. False will stop the post.