Dynamic messaging
diff --git a/php/checkrequests.php b/php/checkrequests.php
new file mode 100644
index 0000000..4995ac4
--- /dev/null
+++ b/php/checkrequests.php
@@ -0,0 +1,32 @@
+<?php
+ // Get the id
+ $id = $_GET['id'];
+
+ // Define MySQL login variables
+ $servername = "localhost"; // "fdb22.awardspace.net";
+ $username = "root"; // "3155560_users";
+ $password = ""; // "btechnoro@fox4news.info";
+
+ // Create connection
+ $conn = new mysqli($servername, $username, $password, "pastanaga");
+ if ($conn->connect_error) die("Connection failed: " . $conn->connect_error);
+ $conn->set_charset("utf8");
+
+ // Do the query
+ $query = "SELECT requested FROM users WHERE id=".$id;
+ $state = 0;
+
+ // Fetch the information of the user
+ if ($result = $conn->query($query)) {
+ while ($row = $result->fetch_row()) $state = $row[0];
+ $result->close();
+ } else {
+ die("Wrong query: " . $query);
+ }
+
+ // Close connection
+ $conn->close();
+
+ // Print the state
+ echo $state;
+?>