Chat with Thomas | Profile

Welcome to the Modern Web Design.

✏ Building lucky draw game with PHP

You can find the source code here: [](

What is the game about?

  1. The browser shows some options.
  2. Player chooses the correct option.
  3. JavaScript asks server to run a lucky draw logic and get the result.
  4. If the result is "Win", JS shows the contact form. If not, JS shows the "bad luck" screen.
  5. After post the contact form to server, server renders a "Thanks" page.

Here is the result of the game. Please be aware of the console outputs.


// TODO: I’ll post the screencast of the coding process later.