Mysql database all data not show

Discussion in 'Web Design & Coding' started by mark56z, Aug 7, 2012.

  1. mark56z

    mark56z OSNN One Post Wonder

    Messages:
    9
    hi guys i am example working in php and database but some time problem my table all data submit direction variable but all data now submit database.
     
  2. VanessaMeacham

    VanessaMeacham OSNN One Post Wonder

    Messages:
    3
    Location:
    USA
    HI ! I give you one example for your problem regarding data i think it will help you.

    <html>

    <head>

    <title>Search data</title>

    </head>

    <body>

    <table>

    <tr>

    <td align="center">EMPLOYEES DATA</td>

    </tr>

    <tr>

    <td>

    <table border="1">

    <tr>

    <td>NAME</td>

    <td>EMPLOYEES<br>NUMBER</td>

    <td>ADDRESS</td>

    </tr>

    <?

    //the example of searching data

    with the sequence based on the field name

    //search.php

    mysql_connect("localhost","root","admin");//database connection

    mysql_select_db("employees");



    $order = "SELECT * FROM data_employees ORDER BY name";

    //order to search data

    //declare in the order variable


    $result = mysql_query($order);

    //order executes the result is saved

    //in the variable of $result



    while($data = mysql_fetch_row($result)){

    echo("<tr><td>$data[1]</td><td>$data[0]</td><td>$data[2]</td></tr>");

    }

    ?>

    </table>

    </td>

    </tr>

    </table>

    </body>

    </html>