Advertisement
Guest User

halp

a guest
Jun 4th, 2016
94
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.72 KB | None | 0 0
  1. de error:
  2. Catchable fatal error: Object of class mysqli_result could not be converted to string in F:\school\root\GIP\webpaginas\bestelBon.php on line 13
  3.  
  4. de code (session word geopened in header):
  5. <?php
  6. include("header.php");
  7. include("nav1.html");
  8. $servername ="localhost";
  9. $username = "root";
  10. $password = "usbw";
  11. $dbname = "GIP";
  12.  
  13. $connect1 = new mysqli($servername, $username, $password, $dbname);
  14. if(isset($_POST["btnBestel"])){
  15. $sql = "SELECT `Klant_ID` FROM klanten WHERE Klant_Login = \"".$_SESSION['login']."\"";
  16. $klantID = $connect1->query($sql);
  17. echo $klantID;
  18. $sql = "INSERT INTO `bestelling` VALUES(NULL, ".$klantID.", ".$_SESSION['totaal'].")";
  19. echo $sql;
  20. $qresult = $connect1->query($sql);
  21. }
  22. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement