A few friends of mine run a little competition between ourselves for a bit of fun. This has been in the past, a sports prediction spreadsheet where we predict the outcomes of champions in various football leagues around the world.
Up to now its always been a very laborious spreadsheet with that my friend can no longer be bothered to do.
is there any way I can do this in php / html?
There would be 8 players predicting the outcome of 6 leagues. We award points for who gets the most, half points for coming close etc.
Any ideas as to what way to approach this would be appreciated. I amvery proficient in HTML and CSS, but a bit of a novice in PHP…but if there is a script or some idea to get this up and running I would be very appreciative.
I’d say there certainly will be a way you can do it in PHP, by replicating the calculations you do in the spreadsheet into PHP. You’ll need some kind of username login system so the players can log in (loads of examples on here and elsewhere), and a database to store the games, the final scores and each users predictions. Then you’ll need a report to display actual vs. predictions.
I’d sit down and work out what data you need to store and how you need to access it, that will give you an idea of how to lay out the database tables, then go from there.
Oh, and when you look at tutorials, don’t pick any that use the deprecated “mysql” function calls - look out for mysqli or PDO database access. mysql calls will stop working soon, and if you’re quite new to PHP it’s a waste of time learning something that is already outdated.
The other approach is to do some google searches for an existing solution that comes close. Specifically, look for wordpress or drupal plugins. You will have to tweak the prediction calculations but that would probably be easier than starting from ground zero.