Word Game is a simple game written on PHP, JavaScript and HTML. This is my first PHP project.
Download the files above and to use the simple game please add your database settings into the files below:
server.php
server2.php
server3.php
oyunserver.php
This a simple game without graphics where you can register your account and add words and translations. There are three main PHP files after registration:
Here, I just asked the user, words and translations and then send them to server3.php. In server3.php file I added them into database with his/her id next to them.
//server3.php
$sql = "INSERT INTO words (az, eng, user_id) VALUES('$words', '$words_az', '$user_id')";
include 'insertingwords.php';
if (mysqli_query($con, $sql) === TRUE)
{
echo "New record created successfully";
}
In insertingwords.php file, if the user clicks to Play Game button, it will be directed to oyun.php file where they choose the language that they want to answer questions and with form tag, application goes to oyun_server.php. This file gets the words of the user and sends them to oyun_main.php in specific order he/she wants.
To show the words of the user, here I have used PHP and JavaScript, I created a quiz type game with words and told the user his score at the end.
This file is for sign in.
This file is for sign up.