<?php include_once "../php/Lock.php"; $identification = $_REQUEST['identification']; $locks = Lock::searchByOwner($identification); foreach ($locks as $lock) { $row = "<tr>" . "<td><input type='radio' name='locks' onchange='showCodes(selectLock())' value='" . $lock->serial() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $lock->model() . "</td>" . "</tr>"; echo $row; }
<div class="col-md-12"> <fieldset> <legend>Locks</legend> <table class="table"> <thead> <tr> <th>#</th> <th>Selection</th> <th>Serial</th> <th>Address</th> <th>Model</th> </tr> </thead> <tbody id='locks'> <?php $locks = Lock::searchByOwner($_SESSION['identification']); $counter = 1; foreach ($locks as $lock) { $row = "<tr>" . "<td>" . $counter++ . "</td>" . "<td><input type='radio' name='locks' onchange='showCodes(selectLock())' value='" . $lock->serial() . "'></td>" . "<td>" . $lock->serial() . "</td>" . "<td>" . $lock->address() . "</td>" . "<td>" . $lock->model() . "</td>" . "</tr>"; echo $row; } ?> </tbody> </table> </fieldset> </div> </div> </div> </div> <div class="section"> <div class="container">
public function myLocks() { return Lock::searchByOwner($this->identification); }