I am building a game on html5(phaser js) for which i need to build a leaderboard. the code snippet is this:
restart_game: function() {
// Start the 'main' state, which restarts the game
//this.game.time.events.remove(this.timer);
//this.game.time.events.remove(this.timer2);
//this.game.state.start('main');
var string="score.php?score="+this.score;
window.open(string);
},
in the window.open function i wish to pass the value of score to another page where i will ask for the player's name and then insert both the score and the name to the database. But i am having trouble passing the score value across three pages. How can i do this? Do I need AJAX or just PHP and Javascript is sufficient?