Guest User

Untitled

a guest
Feb 18th, 2018
79
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.85 KB | None | 0 0
  1. <?php
  2. mysql_connect("localhost","root","") or die("Fout: Er is geen verbinding met de MySQLserver tot stand gebracht!");
  3. mysql_select_db("firstchoice") or die("Fout: Het openen van de database is mislukt!");
  4. ?>
  5. <html>
  6. <body>
  7.  
  8.  
  9. Kies een Artikel<br>
  10. <form action="opdr9.php" method="post">
  11. <select name="omschrijving" "verkoopprijs" size="1">
  12. <?php
  13.  
  14. $res = mysql_query("SELECT omschrijving, verkoopprijs FROM artikel");
  15. while($row = mysql_fetch_row($res))
  16. {
  17. echo '<option>'.$row[0].' - '.$row[1].'</option>';
  18. }
  19. ?>
  20. </select>
  21. <br><br>Vul de nieuwe prijs van het artikel in<br>
  22. <input type="text" name="prijs"/><br>
  23. <input type="submit" VALUE="Verzend" />
  24.  
  25. </form>
  26.  
  27. <?php
  28. UPDATE
  29. verkoopprijs
  30. SET
  31. verkoopprijs = 'prijs'
  32. WHERE
  33. omschrijving = '$res';
  34. ?>
  35. </body>
  36. </html>
Add Comment
Please, Sign In to add comment