Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $gebruikersrol = array("fotograaf");
- include("beveiliging.php");
- include("mysql_connect_db.php");
- date_default_timezone_set("Europe/Amsterdam");
- if ( isset($_POST['submit']))
- {
- /*
- foreach ( $_POST['prijs'] as $value)
- {
- echo $value."<br/>";
- }
- */
- foreach ($_POST['prijs'] as $value)
- {
- $query = "update `opdrachten` set `prijs` = '".$value."' ";
- }
- }
- $query = "select* from opdrachten order by `user_id`";
- $result = mysqli_query($db_connection, $query) or die ("queryfout: ".$query);
- ?>
- <p>opdrachten van klanten:<p/>
- <form action 'index.php? content=opdrachten' method= 'post'>
- <table>
- <tr>
- <th>id</th>
- <th>user_id</th>
- <th>omschrijving opdracht</th>
- <th>aantal fotos</th>
- <th>datum evenement</th>
- <th>datum oplevering</th>
- <th>datum plaatsing</th>
- <th>kleur fotos</th>
- <th>prijs</th>
- </tr>
- <?php
- while ($row = mysqli_fetch_array($result))
- {
- echo "<tr>
- <td colspan='9'>".$row['user_id']." </td>
- </tr>
- <tr>
- <td>".$row['id']."</td>
- <td>".$row['user_id']."</td>
- <td>".$row['omschrijving_opdracht']."</td>
- <td>".$row['aantal_fotos']."</td>
- <td>"; $date =
- new DateTime ($row["datum_evenement"]);
- echo $date->format ("d-m-y")."</td>
- <td>";$date=
- new DateTime ($row["datum_oplevering"]);
- echo $date->format ("d-m-y")."</td>
- <td>";
- $date=
- new DateTime($row["plaatsingdatum"]);
- echo $date->format("d-m-y")."</td>
- <td>".$row['kleur_fotos']."</td>
- <td> <input type = 'text' value='";
- if ( $row['prijs'] == 0 )
- {
- echo '';
- }
- else
- {
- echo $row['prijs'];
- }
- echo "'size= '6' name='prijs[]'/>
- </td>
- </tr>";
- }
- ?>
- <tr>
- <td colspan='9'>
- <input type='submit' value='voeg prijs toe' name= 'submit' />
- </td>
- </tr>
- </table>
- </form>
Add Comment
Please, Sign In to add comment