Guest User

Untitled

a guest
Feb 15th, 2019
292
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.79 KB | None | 0 0
  1. <form method="POST" action="">
  2. <input id="4"type="text" name="numstat" value="$PoleCauseID">
  3. <input id="5" type="submit" name="cause" value="1Вызвать">
  4. <input id="6" type="submit" name="served" value="Обслжуен"/>
  5. </form>
  6. <?php // Вызвать
  7. $host = "localhost";
  8. $username = "root";
  9. $password = "";
  10. $dbname = "ironbank";
  11. if (isset($_POST['cause']))
  12. { $PoleCauseID;
  13. $PoleCauseNumber;
  14. $connect = mysqli_connect ($host, $username, $password, $dbname); // подключение к базе
  15. mysqli_set_charset($connect,"utf8");
  16. $connect->set_charset('utf8');
  17. $chek_query = " SELECT * FROM Business "; // Подключение к таблице
  18. $db = mysqli_query ($connect, $chek_query) or die("Ошибка" .mysqli_error($connect));
  19.  
  20.  
  21.  
  22.  
  23.  
  24. while ($row = mysqli_fetch_assoc( $db)) // Присвоение ID
  25. {
  26. $PoleID = $row['ID'];
  27. $PoleNumber = $row['Number'];
  28. $PoleName = $row['name'];
  29. $PoleStatus = $row['Status'];
  30. $PoleCod =$row['cod'];
  31. $PoleDate = $row['date'];
  32. $PoleTime = $row['time'];
  33. if ($PoleCod == 1)
  34. {
  35. $PoleCauseID = $PoleID + 1;
  36. $PoleCauseNumber = $PoleNumber + 1;
  37. }
  38. }
  39.  
  40. echo " ID = $PoleCauseID, Number = $PoleCauseNumber |";
  41.  
  42.  
  43. }
  44.  
  45. ?>
Add Comment
Please, Sign In to add comment