Twitter bootstrap 传递id到引导模式

Twitter bootstrap 传递id到引导模式,twitter-bootstrap,modal-dialog,Twitter Bootstrap,Modal Dialog,我想把这个表中的值userID传递给Bootstrap modal,这样我们就可以查看他的信息了。有人能帮我怎么做吗 这是我的用户表: <table cellpadding="0" cellspacing="0" width="100%" class="table table-striped" id="example"> <thead> <tr> <th align="center" width="5%"&

我想把这个表中的值userID传递给Bootstrap modal,这样我们就可以查看他的信息了。有人能帮我怎么做吗

这是我的用户表:

<table cellpadding="0" cellspacing="0" width="100%" class="table table-striped" id="example">
    <thead>
        <tr>
            <th align="center" width="5%">n</th>
            <th align="center">name</th>
            <th align="center" width="12%">Activity</th>                                  
        </tr>
     </thead>
     <tbody>
         <tr>
             <td><?= $i; ?>.</td>
             <td><?php echo $row['name']; ?></td>
             <td>
                 <a href="#dModal" data-toggle="modal" data-target="#dModal" data-id="<?php echo $row['userID'] ?>" class="open-AddBookDialog btn btn-small btn-square btn-info" title="view"><i class="icon-search"></i></a>
             </td>
          </tr>
    </tbody>
</table>
这是我在同一个php文件中的引导模式。我只是把下面的表编码上面,而不是在单独的文件

<div id="dModal" class="modal hide fade" role="dialog" aria-labelledby="myModalLabel">
        <div class="modal-header">
            <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
            <h3 id="myModalLabel">User Info</h3>
        </div>
        <?php

          $id = $_GET['id'];
          //echo $id;

          $sql_str = "SELECT *
                      FROM
                        adm_user 
                      WHERE userID = '".$id."' ";

          echo ($sql_str);

          $res_user =   mysql_query($sql_str) or die(print_r(mysql_error()));
          $result = mysql_query($sql_str);

        ?>


        <div class="modal-body">
            // view user info here
        </div>
    </div>