Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- de error:
- 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
- de code (session word geopened in header):
- <?php
- include("header.php");
- include("nav1.html");
- $servername ="localhost";
- $username = "root";
- $password = "usbw";
- $dbname = "GIP";
- $connect1 = new mysqli($servername, $username, $password, $dbname);
- if(isset($_POST["btnBestel"])){
- $sql = "SELECT `Klant_ID` FROM klanten WHERE Klant_Login = \"".$_SESSION['login']."\"";
- $klantID = $connect1->query($sql);
- echo $klantID;
- $sql = "INSERT INTO `bestelling` VALUES(NULL, ".$klantID.", ".$_SESSION['totaal'].")";
- echo $sql;
- $qresult = $connect1->query($sql);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement