-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathresult.php
More file actions
65 lines (54 loc) · 2.2 KB
/
Copy pathresult.php
File metadata and controls
65 lines (54 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
<?php
session_start();
;
?>
<html>
<head>
<link rel="preconnect" href="https://fonts.gstatic.com">
<link href="https://fonts.googleapis.com/css2?family=Montserrat:wght@300;400;500&display=swap" rel="stylesheet">
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">
<link rel="stylesheet" href="style.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<title>RESULT</title>
<body>
<div class="container">
<form method = "POST" autocomplete="off" name="submit-to-google-sheet" id="submit-to-google-sheet">
<div class="items">
<p id="title">TIME OVER !!</p>
<div id="sign">
<label >Name</label>
<textarea class="form-control form-control-sm mb-0" rows="1" name="name" readonly ><?php echo $_SESSION['cname'];?></textarea>
</div>
<div id="sign">
<label>E-mail</label>
<textarea class="form-control form-control-sm mb-0" rows="1" name="email" readonly ><?php echo $_SESSION['cemail'];?></textarea>
</div>
<div id="sign">
<label>Current Score</label>
<textarea class="form-control form-control-sm mb-0" rows="1" name="score" readonly ><?php echo $_SESSION['score'];?></textarea>
</div>
<div id="sign">
<label>Negative Score</label>
<textarea class="form-control form-control-sm mb-0" rows="1" name="n-score" readonly ><?php echo $_SESSION['n-score'];?></textarea>
</div>
<button class="btn btn-outline-primarytype=" submit" id="button">SUBMIT</button>
</div>
<script>
$("#submit-to-google-sheet").submit((e)=>{
e.preventDefault()
$.ajax({
url:"https://script.google.com/macros/s/AKfycbw-7WN4mS1Z-JxwqQ8fBSi7EFtRReuYeDbXGMXc4Nq6JfPTzmB3/exec",
data:$("#submit-to-google-sheet").serialize(),
method:"post",
success:function (response){
alert("Form submitted successfully");
window.location.href = 'index.php';
},
error:function (err){
alert("Something Error")
}
})
})
</script>
</body>
</html>