-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathgetuser.php
More file actions
42 lines (36 loc) · 985 Bytes
/
getuser.php
File metadata and controls
42 lines (36 loc) · 985 Bytes
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
<?php session_start();
require_once("includes/connection.php");
require_once("includes/functions.php");
include('includes/graidlechart/graidle.php');
include_once("includes/phpMyGraph5.0.php");
// SESSION VARIABLES
if (!loggedin()){
$rmessage = "You must be logged in to come to this page!";
$_SESSION['rmessage'] = $rmessage;
toproducts();
}
$query = "Select * FROM `products`;";
$queryh = $connection->query($query);
echo "<table border='1'>
<tr>
<th>ISBN</th>
<th>Product Name</th>
<th>Dimensions</th>
<th>Selling Price</th>
<th>Weight</th>
<th>Code</th>
<th>Added by (User ID)</th>
</tr>";
while ($p = $queryh->fetch_assoc()){
echo "<tr>";
echo "<td>" . $p['ISBN'] . "</td>";
echo "<td>" . $p['product_name'] . "</td>";
echo "<td>" . $p['dimensions'] . "</td>";
echo "<td>" . $p['selling_price'] . "</td>";
echo "<td>" . $p['weight'] . "</td>";
echo "<td>" . $p['code'] . "</td>";
echo "<td>" . $p['User_ID'] . "</td>";
echo "</tr>";
}
echo "</table>";
?>