Advertisement
apl-mhd

seelcet form database

Sep 11th, 2018
363
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.42 KB | None | 0 0
  1.  
  2. <?php
  3. /**
  4.  * Created by PhpStorm.
  5.  * User: apelmahmud
  6.  * Date: 02/04/2017
  7.  * Time: 3:24 PM
  8.  */
  9.  
  10.  
  11.  
  12.     $serverName = 'localhost';
  13.     $userName = 'root';
  14.     $pass = '';
  15.     $dbname = 'Fifa';
  16.  
  17.     $conn = new  mysqli($serverName,$userName,$pass,$dbname);
  18.  
  19.     if($conn->connect_error){
  20.  
  21.         die("aaa");
  22.     }
  23.  
  24.  
  25. $sql = "SELECT * FROM manager ";
  26. $result = $conn->query($sql);
  27. /*
  28. while ($row = $result->fetch_assoc()){
  29.  
  30.         echo $row['manager_id']. " " .$row['manager_name']. "  ". $row['country'] . " ". $row['Date_of_Birth']. "<br>";
  31. */
  32.  
  33.  
  34.  
  35.  
  36. echo "<table border='1px solid gray'>
  37.  
  38.        <tr>
  39.        <th> Empltgsfgsoyees_id </th>
  40.        <th>First Name </th>
  41.        <th>Country </th>
  42.        <th>Phone Number </th>
  43.        <th>Job ID </th>
  44.        <th>Salary </th>
  45.        
  46. </tr>";
  47.  
  48. while ($row = $result->fetch_assoc()){
  49.  
  50.  
  51.     echo "<tr>
  52.  
  53.      <td>".$row['manager_id']."</td>
  54.      <td>".$row['manager_name']."</td>
  55.      <td>".$row['country']."</td>
  56.      <td>".$row['Date_of_Birth']."</td>
  57.      <td>no job</td>
  58.        <td>0000</td>
  59.      
  60.      
  61.  
  62.    </tr>";
  63. }
  64.  
  65.  
  66. echo "</table>";
  67.  
  68.  
  69.  
  70.  
  71.  
  72.  
  73.  
  74.  
  75.  
  76.  
  77.  
  78.  
  79. /*$serverName = 'localhost';
  80. $userName = 'root';
  81. $password = '';
  82. $dbname = 'Discount';
  83.  
  84.  
  85. $con =  new  mysqli($serverName,$userName,$password, $dbname);
  86.  
  87. if($con->connect_error)
  88.     die("connect fail".$con->connect_error);
  89.  
  90. else
  91.     echo "succeess"*/
  92.  
  93.  
  94. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement