-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathqoutation.php
29 lines (24 loc) · 1.05 KB
/
qoutation.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
<?php
include "quotationlog.html";
$mysqli = new mysqli("localhost", "root", "root","vendor");
if ($mysqli->connect_error) {
die("Connection failed: " . $mysqli->connect_error);
}
var_dump($_POST);
$company=mysqli_escape_string($_POST['company']);
$item=mysqli_escape_string($_POST['item']);
$quantity=mysqli_escape_string($_POST['quantity']);
$total=mysqli_escape_string($_POST['total']);
$discount=mysqli_escape_string($_POST['discount']);
$amount=mysqli_escape_string($_POST['amount']);
echo "INSERT INTO qoutation (`company`, `items`, `quantity`, `total`, `discount`, `amount`) VALUES ('{$company}', '{$item}', '{$quantity}', '{$total}', '{$discount}','{$amount}')";
$query=mysqli_query($mysqli,"INSERT INTO qoutation (`company`, `items`, `quantity`, `total`, `discount`, `amount`) VALUES ('{$company}', '{$item}', '{$quantity}', '{$total}', '{$discount}','{$amount}')");
//var_dump($query);
if ($query) {
echo "<br>Sucessful Booking of Qoutation";
header("Location:quotationlog.php");
}
else {
echo " Registry Already Exists Unable to commit";
}
?>