iang (@iang)

Forum Replies Created

Viewing 2 replies - 1 through 2 (of 2 total)
  • Thanks Sam…this is exactly what I needed to get me going after being stuck for days :-)

    For completeness, here is the first working version of my code:

    <?php

    require_once(‘../bb-load.php’);

    bb_get_header();

    ?>

    <script src=”../my-js/sorttable.js”></script>

    <?php

    $tbl_header=<<<EOD

    </br>

    <h3><center><font color=”#880000″>WBS80 Registered Users</font></center></h3>

    <center><i><font size=”2″>(click on table header to sort</font>)</i></center>

    </br>

    <table class=”sortable” width=’100%’ border=’1′ cellpadding=’4′ cellspacing=’0′ align=’center’>

    <tr>

    <th>lname</th>

    <th>fname</th>

    <th>email</th>

    <th>city</th>

    <th>state/province</th>

    <th>country</th>

    </tr>

    EOD;

    $user_ids = $bbdb->get_col( “SELECT ID FROM $bbdb->users WHERE user_status = 0 ORDER BY id;”, 0 );

    foreach ($user_ids as $key => $value) {

    if ($value == 1) {

    continue;

    }

    $users = bb_get_user( $value );

    $lname = strtolower($users->last_name);

    $fname = strtolower($users->first_name);

    $email = strtolower($users->user_email);

    $city = strtolower($users->city);

    $state = strtolower($users->state);

    $country = strtolower($users->country);

    $tbl_info .=<<<EOD

    <tr>

    <td>$lname</td>

    <td>$fname</td>

    <td>$email</td>

    <td>$city</td>

    <td>$state</td>

    <td>$country</td>

    </tr>

    EOD;

    }

    $tbl_footer = “</table>”;

    $tbl =<<<TBL

    $tbl_header

    $tbl_info

    $tbl_footer

    TBL;

    print $tbl;

    ?>

    <p><h3 id=”tag”>AGE QUOD AGIS</h3></p>

    <?php bb_get_footer(); ?>

    It works like a charm…you are the best! Thanks much.

Viewing 2 replies - 1 through 2 (of 2 total)