-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpages.php
executable file
·58 lines (48 loc) · 1.26 KB
/
pages.php
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
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
"http://www.w3.org/TR/html4/loose.dtd">
<?php
session_start();
require 'config.php';
require ('layout.php');
?>
<?php
$var = $_GET['var'];
$roll=$_SESSION['userroll'];
$query1 = "SELECT * FROM practice_solution where user_id='$roll' and problem_id='$var'";
$result1 = mysqli_query($dbConn, $query1) or die(mysqli_error($dbConn));
?>
<h3><b><i> Previous Solutions</i></b></h3>
<div class="table-responsive">
<table class="table" border="0" align="center">
<col width="10%">
<col width="10%">
<thead class="thead-inverse" style="color: black">
<tr>
<th> Sol_Id </th>
<th> Date </th>
<th> Result </th>
<th> Time </th>
<th> Runtime </th>
<th> Memory </th>
<th> Language </th>
<th> Solution </th>
</tr>
</thead>
<tbody>
<?php
while ($row = mysqli_fetch_array($result1)) {
echo ' <tr> ';
echo ' <td> ' . $row[2] . ' </td> ';
echo ' <td> ' . $row[3] . ' </td> ';
echo ' <td> ' . $row[4] . ' </td> ';
echo ' <td> ' . $row[5] . ' </td> ';
echo ' <td> ' . $row[6] . ' </td> ';
echo ' <td> ' . $row[7] . ' </td> ';
echo ' <td> ' . $row[8] . ' </td> ';
echo ' <td><a href=user_problem_solution.php?Name='.$row[9].'>Link</a></td>';
echo ' </tr> ';
}
?>
</tbody>
</div>
</table>