title: a button for getting data from sql
body: <p>i have create two table in my databases, 1.loginacc (stay login information(LoginID , Password and Permission)2.borrow (have book that the login borrowed,userid)</p>
  
  <p>below is the code: and i have get all the user id,beside every user that i get from database loginacc ,it has a button called 'get information'.when i click it,it will have order of" select * from borrow where userid = (the loginid that shown out )</p>
  
  <pre><code>&lt;?php
  
    $con = mysql_connect("127.0.0.1","root","password");
  
    mysql_select_db("babytradeapps");
  
    $sql = "Select LoginID , Password , Permission
            from loginacc where Permission = 1 ";
  
  
    $results = mysql_query($sql,$con);
  
  
  
    echo "&lt;tr&gt;&lt;th&gt;Admin&lt;/th&gt;&lt;/tr&gt;";
  
    echo "&lt;table border=5 cellpadding=10&gt;";
    echo "&lt;tr&gt;&lt;th&gt;&lt;/th&gt;&lt;th&gt;ac&lt;/th&gt;&lt;th&gt;pw&lt;/th&gt;&lt;th&gt;per&lt;/th&gt;&lt;th&gt;&lt;/th&gt;&lt;/tr&gt;";
  
    while($row = mysql_fetch_array($results)) { 
  
      echo "&lt;tr&gt;&lt;td&gt;&lt;form action='searchtable.php' method='get'&gt;&lt;button type='button' name='button2' value='button2'&gt;get information&lt;/button&gt;&lt;/td&gt;
  
      &lt;td&gt;&lt;input type=text id='row0' name='row0' value='$row[0]' /&gt;&lt;/td&gt;&lt;td&gt;&lt;input type=text id='row1' name='row1' value='$row[1]' /&gt;&lt;/td&gt;
                &lt;td&gt;&lt;input type=text id='row2' name='row2' value='$row[2]' /&gt;&lt;/td&gt;&lt;td&gt;&lt;input type='submit' name='button' value='change' /&gt;&lt;/td&gt;&lt;/tr&gt;";
  
    }
  
    echo "&lt;/table&gt;";
  </code></pre>