The most basic PHP classification query program

Source: Internet
Author: User

the initial class of PHP classification query program<! DOCTYPE html Public"-//w3c//dtd XHTML 1.0 transitional//en" "Http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd" >$_server[' php_self '];? > "method=" POST "><input type=" submit "name=" sell "value=" wisdom sales/>&nbsp;&nbsp;&nbsp;& nbsp;&nbsp;&nbsp;<input type= "Submit" Name= "manager" value= "Management"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& Nbsp;<input type= "Submit" name= "Serve" value= "smart customer Service"/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;<input type= "Submit" Name= "NewEmployee" value= "smart new employee"/>&nbsp;&nbsp;&nbsp;&nbsp; &nbsp;&nbsp;<input type= "Submit" name= "development" value= "personal development"/&GT;&LT;/FORM&GT;&LT;?PHPif(!Empty($_post[' Sell '])){$conn=mysql_connect("localhost", "root", "root");if(!$conn){ die(' Could not connect the database! ');}mysql_query("SET NAMES UTF8");mysql_query("Set Character_set_client=utf8"); mysql_query("Set Character_set_results=utf8");mysql_select_db("Test",$conn);$sql= "SELECT * from ts1 where name '% Smart Sales% '";$result=mysql_query($sql);Echo' <table height= ' 60% "width=" 60% "border=" 1 "align=" Center ">"; while($row=Mysql_fetch_assoc($result)){Echo' <tr height= ' 45px ' > ';Echo' <td> '.$row[' ID ']. ' </td> '. ' <td> '.$row[' name ']. ' </td> '. ' <td> '.$row[' Image ']. ' </td> ';Echo' </tr> ';}Echo' </table> ';Mysql_close($conn);} //Http://www.pprar.com? ><?PHPif(!Empty($_post[' Serve '])){$conn=mysql_connect("localhost", "root", "root");if(!$conn){ die(' Could not connect the database! ');}mysql_query("SET NAMES UTF8");mysql_query("Set Character_set_client=utf8"); mysql_query("Set Character_set_results=utf8");mysql_select_db("Test",$conn);$sql= "SELECT * from ts1 where name '% smart customer service% '";$result=mysql_query($sql);Echo' <table height= ' 60% "width=" 60% "border=" 1 "align=" Center ">"; while($row=Mysql_fetch_assoc($result)){Echo' <tr height= ' 45px ' > ';Echo' <td> '.$row[' ID ']. ' </td> '. ' <td> '.$row[' name ']. ' </td> '. ' <td> '.$row[' Image ']. ' </td> ';Echo' </tr> ';}Echo' </table> ';Mysql_close($conn);}? ><?PHPif(!Empty($_post[' manager '])){$conn=mysql_connect("localhost", "root", "root");if(!$conn){ die(' Could not connect the database! ');}mysql_query("SET NAMES UTF8");mysql_query("Set Character_set_client=utf8"); mysql_query("Set Character_set_results=utf8");mysql_select_db("Test",$conn);$sql= "SELECT * from Ts1, where name like '% Operating management% '";$result=mysql_query($sql);Echo' <table height= ' 60% "width=" 60% "border=" 1 "align=" Center ">"; while($row=Mysql_fetch_assoc($result)){Echo' <tr height= ' 45px ' > ';Echo' <td> '.$row[' ID ']. ' </td> '. ' <td> '.$row[' name ']. ' </td> '. ' <td> '.$row[' Image ']. ' </td> ';Echo' </tr> ';}Echo' </table> ';Mysql_close($conn);}? ><?PHPif(!Empty($_post[' NewEmployee '])){$conn=mysql_connect("localhost", "root", "root");if(!$conn){ die(' Could not connect the database! ');}mysql_query("SET NAMES UTF8");mysql_query("Set Character_set_client=utf8"); mysql_query("Set Character_set_results=utf8");mysql_select_db("Test",$conn);$sql= "SELECT * from ts1 where name '% Smarter New Employee% '";$result=mysql_query($sql);Echo' <table height= ' 60% "width=" 60% "border=" 1 "align=" Center ">"; while($row=Mysql_fetch_assoc($result)){Echo' <tr height= ' 45px ' > ';Echo' <td> '.$row[' ID ']. ' </td> '. ' <td> '.$row[' name ']. ' </td> '. ' <td> '.$row[' Image ']. ' </td> ';Echo' </tr> ';}Echo' </table> ';Mysql_close($conn);}? ><?PHPif(!Empty($_post[' Development '])){$conn=mysql_connect("localhost", "root", "root");if(!$conn){ die(' Could not connect the database! ');}mysql_query("SET NAMES UTF8");mysql_query("Set Character_set_client=utf8"); mysql_query("Set Character_set_results=utf8");mysql_select_db("Test",$conn);$sql= "SELECT * from Ts1, where name like '% Personal development% '";$result=mysql_query($sql);Echo' <table height= ' 60% "width=" 60% "border=" 1 "align=" Center ">"; while($row=Mysql_fetch_assoc($result)){Echo' <tr height= ' 45px ' > ';Echo' <td> '.$row[' ID ']. ' </td> '. ' <td> '.$row[' name ']. ' </td> '. ' <td> '.$row[' Image ']. ' </td> ';Echo' </tr> ';}Echo' </table> ';Mysql_close($conn);}?></div></body>

The most basic PHP classification query program

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.