<?php
require ("functions.inc.php");
$SESSID_USERNAME = check_session ();
if ($_SERVER["REQUEST_METHOD"] == "GET")
{
    //include ("../../templates/header.tpl");
    include ("./tpl/showprofile.tpl");
    //include ("./tpl/manage.tpl");
        echo "<hr noshade size=0 color=#0080C0 width='100%'>";
        $connect = mysql_con("coreinfo");
        if (!$connect) 
        {
         echo "数据库连接失败!<br>\n";
         echo mysql_error();
         exit;
        }
       else 
       {
        $result = mysql_query("select account from user");
       
        $rows = mysql_num_rows($result);  //取得记录数量
        echo "总用户数: $rows <br>";
        echo "<table width='100%' align='left' border='1' cellpadding='0' cellspacing='0' class='BgTable' bordercolor='#6699CC' >";
     
        echo "<tr><td class='style7' width=200 align='center'>用户名</td>
             
              <td class='style7' width=200 align='center'>修改</td>
              <td class='style7' width=200 align='center'>删除</td>";
        echo "</tr>";
       
        $row = mysql_fetch_row($result);
       //输出每个用户的资料-姓名
      
        while ($row)
        {
              $i=0; 
              echo "<tr>";
              echo "<td class='style2' align='center'> $row[$i] </td>";
              echo "<td class='style7' width=200 align='center'><a href='javascript:modify()'>修改</a></td>";
              echo "<td class='style7' width=200 align='center' ><a href='javascript:delete(s)'>删除</a></td>";
              echo "</tr>";
             $i++;
             $row=mysql_fetch_row($result);
        }
        }
         echo "</table>";
         
        echo " </BODY>";
echo "</HTML>";
}
?>
想调用modify()和delte()这个函数怎么调用
再下面直接加什么?

解决方案 »

  1.   

    我想这里modify()和delte()是js的代码,是客户端执行
    如果php的function(大概不会吧 因为这里有个delete(s),显然不是php代码)建议改成这样
    echo   " <td   class='style7'   width=200   align='center'> <a   href='javascript:".modify()."'> 修改 </a> </td> "; 
                                echo   " <td   class='style7'   width=200   align='center'   > <a   href='javascript:".delete(s)."'> 删除 </a> </td> ";