PHP Classes

File: tpl.list_user.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in Bookmark in
  Classes of marcelo entraigas  >  AMD  >  tpl.list_user.php  >  Download  
File: tpl.list_user.php
Role: Example script
Content type: text/plain
Description: Example - template report
Class: AMD
Add, modify and delete MySQL table records
Author: By
Last change:
Date: 5 years ago
Size: 778 bytes


Class file image Download
= new Database();
$sql = 'SELECT * FROM users';
$arr_users = $db->get_all($sql);
<table border="1" align="center">
    <tr align="center">
        <td width="250px">User</td>
        <td width="100px">Type</td>
        <td width="150px" colspan="2"><small>Add,Modify,Delete</small></td>
<?php foreach ($arr_users as $value):?>
<tr align="center">
        <td align="left"><?php echo $value->username?></td>
        <td><?php echo $value->user_type?></td>
        <td><a href="index.php?id=<?php echo $value->user_id?>">Edit</a></td>
        <td><a href="index.php?del&user_id=<?php echo $value->user_id?>">Delete</a></td>
<?php endforeach;?>
<tr align="right"><td colspan="4"><a href="index.php?id=new">Add New User</a></td></tr>
NOTE: try to insert a XXS! >"<'