-
Notifications
You must be signed in to change notification settings - Fork 0
/
check_client.php
44 lines (44 loc) · 1.28 KB
/
check_client.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
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<?php
session_start();
?>
<html>
<head>
<title> Check Client </title>
</head>
<body>
<font face = "verdana" size = "8">
<center>
<img src="logo.png" alt="logo" style="width:200px;height:200px;">
<p> <b> <font size="5"> Records </font></b> </p>
<?php
require("connection.php");
$VAT_client = $_SESSION["VAT_client"];
$stmt = $connection->prepare("SELECT client.VAT FROM client WHERE client.VAT = :VAT_client;");
if ($stmt == FALSE)
{
$info = $connection->errorInfo();
echo("<p>Error: {$info[2]}</p>");
exit();
}
$stmt->bindParam(':VAT_client', $VAT_client);
$stmt->execute();
$result = $stmt->fetchAll();
if ($result == NULL)
{
echo('<font size="4"> This person is not a client in the database. Would you like to add this person as a client </font>');
?>
<form>
<input type="button" value="Add Person as Client" onclick="window.location.href='insert_client.php'" />
</form>
<?php
}
else
{
header("Location: check_animal.php");
}
$connection = null;
?>
</center>
</font>
</body>
</html>