Guest User

Untitled

a guest
Apr 23rd, 2018
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. <?php
  2. $gebruikersrol = array("fotograaf");
  3. include("beveiliging.php");
  4. include("mysql_connect_db.php");
  5. if ( isset($_POST['submit']))
  6. {
  7. /*
  8. foreach ( $_POST['prijs'] as $value)
  9. {
  10. echo $value."<br/>";
  11. }
  12. */
  13.  
  14. foreach ($_POST['prijs'] as $value)
  15. {
  16. $query = "update `opdrachten` set `prijs` = '".$value."' ";
  17. }
  18. }
  19. $query = "select* from opdrachten order by `user_id`";
  20. $result = mysqli_query($db_connection, $query) or die ("queryfout: ".$query);
  21. ?>
  22.  
  23. <p>opdrachten van klanten:<p/>
  24. <form action 'index.php? content=opdrachten' method= 'post'>
  25. <table>
  26. <tr>
  27. <th>id</th>
  28. <th>user_id</th>
  29. <th>omschrijving opdracht</th>
  30. <th>aantal fotos</th>
  31. <th>datum evenement</th>
  32. <th>datum oplevering</th>
  33. <th>kleur fotos</th>
  34. <th>plaatsingdatum</th>
  35. <th>prijs</th>
  36. </tr>
  37. <?php
  38. while ($row = mysqli_fetch_array($result))
  39. {
  40. echo "<tr>
  41. <td>".$row['id']."</td>
  42. <td>".$row['user_id']."</td>
  43. <td>".$row['omschrijving_opdracht']."</td>
  44. <td>".$row['aantal_fotos']."</td>
  45. <td>".$row['datum_evenement']."</td>
  46. <td>".$row['datum_oplevering']."</td>
  47. <td>".$row['kleur_fotos']."</td>
  48. <td>".$row['plaatsingdatum']."</td>
  49. <td> <input type = 'text' value='";
  50.  
  51. if ( $row['prijs'] == 0 )
  52. {
  53. echo '';
  54. }
  55. else
  56. {
  57. echo $row['prijs'];
  58. }
  59. echo "'size= '6' name='prijs[]'/>
  60. </td>
  61. </tr>";
  62. }
  63. ?>
  64. <tr>
  65. <td colspan='9'>
  66. <input type='submit' value='voeg prijs toe' name= 'submit' />
  67. </td>
  68. </tr>
  69. </table>
  70. </form>
Add Comment
Please, Sign In to add comment