Advertisement
koki2000

tömeges kezelés chexboxal

Mar 3rd, 2017
167
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.91 KB | None | 0 0
  1. <?php
  2. echo '<link type="text/css" rel="stylesheet" href="style.css">';
  3. require_once 'connect.php';
  4.  
  5.     echo '<div id="header">';
  6.     echo "valami szoveg";
  7.     echo '</div>';
  8.  
  9. if(isset($_POST['gomb'])){
  10.     echo 'gomb megnyomva';
  11.     if(isset($_POST['neve'])){
  12.         echo 'gomb bepipalva';
  13.     }else{
  14.         echo 'gomb nincs bepipalva';
  15.     }
  16. }else{
  17.     echo 'gomb nincs megnyomva';
  18. }
  19.  
  20. if($result = $db->query("SELECT * FROM `tomeges`")){
  21.     if($result->num_rows){
  22.         while($row=$result->fetch_assoc()){
  23.             $id=$row['id'];
  24.             echo '<div id="container">';
  25.             echo '<form action="index.php" method = "post">';
  26.                 echo '<table border = "1">';
  27.                     echo '<tr>';
  28.                         echo '<td>'.$row['mezo'].'</td>';
  29.                         echo '<td><input type="checkbox" name="neve"></td>';
  30.                         echo '<td><input type="submit" name="gomb"></td>';
  31.                     echo '</tr>';
  32.                 echo '<table>';
  33.             echo '</div>';
  34.         }
  35.     }else{
  36.         echo 'no rows<br/>';
  37.     }
  38. }
  39.     $db->close();  
  40. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement