Advertisement
Guest User

Untitled

a guest
Nov 27th, 2016
107
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.62 KB | None | 0 0
  1. <?php
  2.  
  3. /*
  4. * To change this license header, choose License Headers in Project Properties.
  5. * To change this template file, choose Tools | Templates
  6. * and open the template in the editor.
  7. */
  8.  
  9.  
  10. $servername = "localhost";
  11. $username = "root1";
  12. $password = "root1";
  13. $dbname = "galabal";
  14.  
  15. $conn = mysqli_connect($servername, $username, $password, $dbname);
  16.  
  17. $sql = "SELECT * FROM manillen";
  18. $result = $conn->query($sql);
  19.  
  20. if ($result->num_rows > 0) {
  21.  
  22. while ($row = $result->fetch_assoc()) {
  23. if($row["player"]==1){
  24. header("Location: http://example.com/myOtherPage.php");
  25. }
  26. }
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement