I am trying to make a simple casino website for a school project but I am having some difficulties with the javascript side of the game.
I found a Wheel of Fortune project online and wanted to use this:
var slicePrizes = ["100", "50", "500", "0", "200", "100", "150", "0"];
var prize;
var prizeText;
playGame.prototype = {
winPrize(){
// now we can spin the wheel again
canSpin = true;
// writing the prize you just won
prizeText.text = slicePrizes[prize];
}
}
Everything works! I only don't know how to get the var slicePrizes[prize] to a php function so I can implement my php-->mysql code? The file is saved as a .js file so I cant just open I believe?