<?php

// configuration
require "../includes/directory_functions.php";
// render directory
render("people/list.php", ["persons" => get_all_persons()]);
Beispiel #2
0
        {
            $arr = array();
            $sql = 'SELECT * FROM persons';
            $stid = oci_parse($conn, $sql);
            $res = oci_execute($stid);
            if (!$res) {
                $err = oci_error($stid);
                echo htmlentities($err['message']);
            }
            while ($row = oci_fetch_array($stid, OCI_ASSOC)) {
                array_push($arr, $row);
            }
            oci_free_statement($stid);
            return $arr;
        }
        $rows = get_all_persons($conn);
        ?>

		<table class="table">
			<thead>
				<tr>
				<th>PersonID</th>
				<th>First Name</th>
				<th>Last Name</th>
				<th>Address</th>
				<th>Email</th>
				<th>Phone</th>
				</tr>
			</thead>
			<tbody>
			<?php