Jump to content

How to show entries in a table


hustler

Recommended Posts

Thanx Mate that worked!

the next question is
We have a member list in the admin where the admin can see all the active members.
At the moment it displays as a list and we can edit and delete them.

What i want at the top is search box where we can enter surname of the member and it display us only ones with that surname.

current code is
[code]
<?php
require_once("includes/class.member.php");
$objMember=new Member();       
$arrMemberList=$objMember->getMembers($req_isActive);
if(count($arrMemberList)>0){
?>
    <form method=post>
        <input type=hidden name="form_action" value="delete">
       
        <table cellspacing=0 cellpadding=0 width=90% border=1>
            <tr>
                <td>&nbsp;</td>
                <td><font face=verdana size=3><b>Name</td>
                <td><font face=verdana size=3><b>Email</td>
                <td><font face=verdana size=3><b>Contact</td>
                <td><font face=verdana size=3><b>Username</td>
                <td><font face=verdana size=3><b>Postcode</td>
            </tr>
<?php while($member=array_pop($arrMemberList)){ ?>
            <tr>
                <td>
                    <input type=checkbox name=id[] value="<?php echo $member["id"];?>">
                    <a href='admin.php?c=editMember&mid=<?php echo $member["id"];?>'>Edit</a>
                </td>
                <td>
                    <font face=verdana size=2>
                        <?php echo $member["firstname"]." ".$member["lastname"];?>&nbsp;
                    </font>   
                </td>
                <td>
                    <font face=verdana size=2>
                        <?php echo $member["email"];?>&nbsp;
                    </font>   
                </td>               
                <td><font face=verdana size=2><?php echo $member["contact"];?>&nbsp;</td>
                <td><font face=verdana size=2><?php echo $member["username"];?>&nbsp;</td>
                <td><font face=verdana size=2><?php echo $member["postcode"];?>&nbsp;</td>
            </tr>
<?php } ?>           
            <tr>           
                <td colspan=6 align=center><input type=submit value="Delete Selected"></td>
            </tr>               
        </table>
    </form>
[/code]
Link to comment
Share on other sites

This thread is more than a year old. Please don't revive it unless you have something important to add.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.