这些按钮,像个表单那样啊,你可以把那个按钮作为submit的提交按钮,然后下面的就是表单选项,按一下用GET方式传递就可以了啊

解决方案 »

  1.   

    这些语句都是得在php文件中的,怎么使用HTML中的语言呢,echo?
      

  2.   

    可以做成按钮也可以做成超链接.html<p><a href='xxx.php?id=1'>1</a></p>
    <p><a href='xxx.php?id=2'>2</a></p>
    <p><a href='xxx.php?id=3'>3</a></p>
      

  3.   

    <?php
    include("session.php");
    mysql_query("SET NAMES 'GB2312'");
    $string=$_POST["string"];
    $value=$_POST["radiobutton"];
    $sign="SELECT * FROM students WHERE $value LIKE '%".$string."%'";
    $result = mysql_query($sign);
    echo  " <table border='0.2'> ";
    $count=0;
    while($row = @mysql_fetch_array($result,MYSQL_ASSOC ))
    {  if(($count*9)%2===0)                               //实现奇偶行不同颜色显示
        {echo "<tr bgcolor=#e5e1e1>";}
    else {echo "<tr bgcolor=#dcdcdc>";}
        foreach($row as $col_value) {
        echo "<td>$col_value</td>";}
    echo " </tr> <br>";
    $count++;
     }
     echo "</table>"; ?>通过这个文件输出有表格形式的查询结果,写成这种形式吗 echo "<p><a href='xxx.php?id=1'>1</a></p>",那连接到的那个xxx.php怎么确定我要详细查看的是第几行的详细查询结果呢?通过id?我真的不懂。
      

  4.   

    phpmyadmin的edit
    http://localhost/phpAdmin/tbl_change.php?db=test&table=t1&token=10fcfa4512824559d2a82db7f20a1069&pos=0&session_max_rows=30&disp_direction=horizontal&repeat_cells=100&dontlimitchars=0&primary_key=+%60t1%60.%60a%60+%3D+1+AND+CONVERT%28%60t1%60.%60b%60+USING+utf8%29+%3D+%27x%27&sql_query=SELECT+%2A+FROM+%60t1%60&goto=sql.php
    所以你也构造一个这样类似的链接就可以了,主要是db,table,sql查询,主键,主键的值.
    <?php 
    include("session.php"); 
    mysql_query("SET NAMES 'GB2312'"); 
    $string=$_POST["string"]; 
    $value=$_POST["radiobutton"]; 
    $sign="SELECT * FROM students WHERE $value LIKE '%".$string."%'"; 
    $result = mysql_query($sign); 
    echo  "<table border='0.2'> "; 
    $count=0; 
    while($row = @mysql_fetch_array($result,MYSQL_ASSOC )) 

     if(($count*9)%2===0)                              //实现奇偶行不同颜色显示 
     { 
       echo " <tr bgcolor=#e5e1e1>";
     } 
     else 
     {
       echo " <tr bgcolor=#dcdcdc>";
     } 
     foreach($row as $key=>$col_value) 
     {  
        if($key == "id")
        {
          //类似这样的
          echo "<td><a href='edit.php?id=$col_value&db=xxx&table=xxx&primary_key=id&value=$col)_value'>$col_value</a></td>";
        }
        else
        {
          echo "<td>$col_value </td>";
        }
     } 
     echo " </tr> <br>"; 
     $count++; 

    echo " </table>"; 
    ?>
      

  5.   

    谢谢您的回答,这个问题算是解决了!!小弟基本上就没基础,还想问一下,您在处理查询结果显示的时候,怎么样才能让php生成的页面比较美观呢,在哪里给加上css呢
      

  6.   

    我在接受提交表单数据的php文件的head里写了<link href="../style/style.css" rel="stylesheet" type="text/css" />,
    在测试的时候,生成的HTML显示出我要表现的灰色,但是,感觉这种颜色是覆盖到php文件中echo出来的数据之上的,那些数据字体颜色原来是黑色的,一覆盖成了灰色,还有echo出来的表格底色也被覆盖了一层颜色。请问应该如何做才能避免这种情况的发生。或者是有什么样的输出数据的方式,谢谢!
      

  7.   

    xxx.css
    .xxx{font:10px;}引入css文件
    <link type="text/css"  href="xxx.css" rel="stylesheet" />类似这样加
    <td class='xxx'>...</td>