Advertisement
Guest User

Untitled

a guest
Mar 6th, 2019
130
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.31 KB | None | 0 0
  1. <body>
  2. <?php
  3. $host="localhost";
  4. $user="root";
  5. $pass="a-1800";
  6. $db_name="test_base";
  7. $link=mysqli_connect($host,$user,$pass,$db_name);
  8. $cod=mysqli_set_charset( $link,'utf8' );
  9.  
  10. ?>
  11. <div id=TAB_1 style="position:absolute;top:200px;left:600px">
  12. <table border='2' class="all" style="width:800px;height:300px">
  13. <tr>
  14. <td>№ </td>
  15. <td>ФРАКЦИИ</td>
  16. <td>ВЫВОД ДАННЫХ</td>
  17. </tr>
  18. <?php
  19. $sql = mysqli_query($link ,"SELECT `ID`, `Name`, `Price` FROM `products`");
  20. while ($result = mysqli_fetch_array($sql)) {
  21. $str=mb_convert_encoding('products', "UTF-8", "cp-1251");
  22. echo '<tr><td>'.$result['ID'].'</td>'.
  23. '<td>'.$result['Name'].'</td>'.
  24. '<td>'.$result['Price'].'%</td>'.
  25. } -ЗДЕСЬ ОШИБКА
  26. ?>
  27. </table>
  28. <table id="tab">
  29. <form action=""class="tab_all" method="POST">
  30. <tr>
  31. <td class="fraktion">ФРАКЦИИ:</td>
  32. <td><input type="text"class="name" name="Name"size="8" value="<?php echo ($result['Name']); ?>"></td>
  33. </tr>
  34. <tr>
  35. <td class="input_db">ВЫВОД :</td>
  36. <td class="time"><input type="number" class="info" name="Price" value="<?php echo ($result['Price']); ?>"></td>
  37. </tr>
  38.  
  39. </form>
  40. </table>
  41. </div>
  42.  
  43. </body>
  44.  
  45. '<td>'.$result['Price'].'%</td>';
  46. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement