Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!DOCTYPE html>
- <html>
- <head>
- <title></title>
- </head>
- <body>
- <?php
- $server = "localhost";
- $user = "root";
- $pass = "";
- $dbname = "toolsforever";
- //Creating connection for mysqli
- $conn = new mysqli($server, $user, $pass, $dbname);
- //Checking connection
- if($conn->connect_error){
- die("Connection failed:" . $conn->connect_error);
- }
- $locatiecode3 = mysqli_real_escape_string($conn, $_POST['locatiecode3']);
- $productcode3 = mysqli_real_escape_string($conn, $_POST['productcode3']);
- $aantal3 = mysqli_real_escape_string($conn, $_POST['aantal3']);
- $sql = "INSERT INTO voorraad (Locatiecode, Productcode, Aantal)
- VALUES ('$locatiecode3' , '$productcode3' , '$aantal3')";
- //$sql = "INSERT INTO voorraad (Locatiecode, Productcode, Aantal) VALUES ('$locatiecode3', '$productcode3', '$aantal3')";
- if($conn->query($sql) === TRUE){
- echo "Record Added Sucessfully";
- }
- else
- {
- echo "Error" . $sql . "<br/>" . $conn->error;
- }
- $conn->close();
- ?>
- <a href='producten.php'>Klik hier om terug te gaan.</a>
- </body>
- </html>
Add Comment
Please, Sign In to add comment