Guest User

Untitled

a guest
Apr 23rd, 2018
76
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.50 KB | None | 0 0
  1. <?php
  2. require("mysql_connect.php");
  3. //include("beveiliging.php");
  4. date_default_timezone_set("Europe/Amsterdam");
  5. if(isset( $_POST['submit']))
  6. {
  7.  foreach($_POST['prijs'] as $key => $value)
  8.  {
  9.     $query = "update `opdrachten` set `prijs` = '".$value."'";
  10.     echo $key." | ".$value."<br />";
  11.  }
  12. }
  13.  
  14. $query = "select * from `opdrachten` order by `datum_oplevering`";
  15.  
  16. $result = mysqli_query($db_connection,$query);
  17. echo "  <form action='index.php?content=opdrachten' method='post'>
  18.         <table>
  19.         <th>
  20.             Opdracht Nummer:
  21.         </th>
  22.             <th>
  23.             Klant Nummer:
  24.         </th>
  25.             <th>
  26.             Omschrijving
  27.         </th>
  28.             <th>
  29.             Kleur
  30.         </th>
  31.             <th>
  32.             Aantal Foto's
  33.         </th>
  34.             <th>
  35.             Maat
  36.         </th>
  37.             <th>
  38.             Datum Oplevering
  39.         </th>
  40.         <th>
  41.             Datum Plaatsing
  42.         </th>
  43.             <th>
  44.             Prijs
  45.         </th>;
  46.                     <th>
  47.             Bevestigt
  48.         </th>
  49.         <th>
  50.             Betaald
  51.         </th>";
  52.         while ($row = mysqli_fetch_array($result))
  53.         {
  54.             echo "<tr>
  55.                     <td>".$row['id']."</td>
  56.                     <td>".$row['user_id']."</td>
  57.                     <td>".$row['omschrijven_opdracht']."</td>
  58.                     <td>".$row['kleur']."</td>
  59.                     <td>".$row['aantal_fotos']."</td>
  60.                     <td>".$row['maten']."</td>
  61.                     <td>".$row['datum_oplevering']."</td>
  62.                     <td>";
  63.                         $date = new DateTime($row["datum_plaatsing"]);
  64.                        
  65.                     echo $date->format("d-m-Y")."</td>
  66.                     <td><input type='text' name='prijs' /></td>
  67.                     <td>".$row['bevestigd']."</td>
  68.                     <td>".$row['betaald']."</td>
  69.                  </tr>
  70.                  
  71.                 ";
  72.         }
  73. ?>
  74. <input type='submit' name='submit' value='Wijzigen' />
  75. </from>
Add Comment
Please, Sign In to add comment