Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to send the value of the javascript variable value to my php page

$(document).ready(function() {
   $("#submitscore").click(function(event){
     var user = $('#username').val();
     var value = document.getElementById('yourscore').innerHTML;
      $.post( 
         "submitscore.php",
         { username: user, score: value }
           );
  });
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #send #javascript #variable #php #page
ADD COMMENT
Topic
Name
3+8 =