Betting the games with friends and family for extra incentive

Like almost everything else, the  2020 Euro Cup fell victim to the pandemic.  It was postponed to this year and will begin in a few days on Friday the 11th.

I am very excited and looking forward to watching some international football again, even though I haven’t even been following football as much in recent years  in favor of the NFL, but I always enjoy events like the World Cup or the Euro Cup.

Watching German World/Euro Cup games in a group is always a lot of fun. However, with the pandemic still around, it’s probably not going to be possible. But there is another method of adding a bit of extra spice to the games: Betting on them. I don’t bet real money on sports, but even bragging rights among friends and family members is incentive enough.

World Cup betting game

I have already created a betting game for the 2018 World Cup. However, I didn’t do it properly and made it very hard-coded only for that event. There was no way to add a new event with new games to bet on, which turned out to be very short-sighted.

I could have just deleted the 2018 World Cup data and filled in the new Euro Cup 2021 games, which could have been done in half an hour or so. However, I don’t like deleting data and in any case, I would have had the same problem again next year for the 2022 World Cup. So instead, I did some major changes to the website so it can support multiple events.

A screenshot of my betting game website. You can see upcoming games with the country flags and inputs to place your bets for the games.

The upcoming games and a form to place your bets on them, image by author.

#javascript #football #php #programming

Creating a Euro Cup Betting Game Website
1.45 GEEK