-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.php
28 lines (28 loc) · 914 Bytes
/
index.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
<?php
require_once "db.php";
session_start();
if ( isset($_SESSION['error']) ) {
echo '<p style="color:red">'.$_SESSION['error']."</p>\n";
unset($_SESSION['error']);
}
if ( isset($_SESSION['success']) ) {
echo '<p style="color:green">'.$_SESSION['success']."</p>\n";
unset($_SESSION['success']);
}
echo '<table border="1">'."\n";
$result = mysql_query("SELECT firstname, lastname, username, email, password, collectorID FROM collector");
while ( $row = mysql_fetch_row($result) ) {
echo "<tr><td>";
echo(htmlentities($row[0]));
echo("</td><td>");
echo(htmlentities($row[1]));
echo("</td><td>");
echo(htmlentities($row[2]));
echo("</td><td>\n");
echo('<a href="edit.php?id='.htmlentities($row[3]).'">Edit</a> / ');
echo('<a href="delete.php?id='.htmlentities($row[3]).'">Delete</a>');
echo("</td></tr>\n");
}
?>
</table>
<a href="registration.php">Add New</a>