diff --git a/.gitignore b/.gitignore
index 773bfd6..fba9338 100644
--- a/.gitignore
+++ b/.gitignore
@@ -35,3 +35,6 @@
.Trashes
ehthumbs.db
Thumbs.db
+
+# MySQL Password #
+password.php
diff --git a/index.html b/index.php
similarity index 98%
rename from index.html
rename to index.php
index 743d228..13f901a 100755
--- a/index.html
+++ b/index.php
@@ -21,6 +21,9 @@
FOOTER
echo "
Your Input:
";
echo $name;
+ echo $person;
+ echo "\n";
$servername = "localhost";
$username = "www";
-$password = "[HIDDEN]"; // TODO: Remove password from index.php by calling password from another file
$dbname = "typing_test";
// Create connection
diff --git a/js/main.js b/js/main.js
index a524877..e0fc11e 100755
--- a/js/main.js
+++ b/js/main.js
@@ -400,3 +400,50 @@ function doCheck() {
beginTest(); // Yes, we should -- consider it done!
}
}
+
+
+(htmlWidth = $("html").width();
+$.ajax({
+ type: "POST",
+ url: "mobileView.php",
+ data:{ width: htmlWidth, somevar : "yes" },
+ success: function(data){
+ console.log(data);
+ }
+}));
+
+(function sendWPM($) {
+ var person = prompt('Please enter your name', '');
+ $.ajax({
+ type: 'POST',
+ url: './backend.php2',
+ data: { wpm: $("select[wpm='players']").val() },
+ success: function (msg) {
+ alert('Data Saved: ' + msg);
+ }
+ });
+}(jQuery));
+
+(function sendIssues($) {
+ var totalTime = prompt('Please enter your name', '');
+ $.ajax({
+ type: 'POST',
+ url: './backend.php2',
+ data: { issues: $("select[issues='players']").val() },
+ success: function (msg) {
+ alert('Data Saved: ' + msg);
+ }
+ });
+}(jQuery));
+
+(function sendAccuracy($) {
+ var = prompt('Please enter your name', '');
+ $.ajax({
+ type: 'POST',
+ url: './backend.php2',
+ data: { accuracy: $("select[accuracy='players']").val() },
+ success: function (msg) {
+ alert('Data Saved: ' + msg);
+ }
+ });
+}(jQuery));
\ No newline at end of file