-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobd_code_lookup.php
More file actions
115 lines (109 loc) · 3.7 KB
/
obd_code_lookup.php
File metadata and controls
115 lines (109 loc) · 3.7 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
<?php
include 'db_connect.php'; // Include your database connection file
if ($_SERVER["REQUEST_METHOD"] == "POST") {
$obd_code = $_POST['obd_code'];
// Prepare and execute the SQL query
$stmt = $conn->prepare("SELECT description, moreinfo, imgpath FROM obd_codes WHERE code = ?");
if ($stmt === false) {
die("Error preparing statement: " . $conn->error);
}
$stmt->bind_param("s", $obd_code);
$stmt->execute();
$stmt->bind_result($description, $moreinfo, $imgpath);
$stmt->fetch();
$stmt->close();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>OBD Code Lookup</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0; /* Light gray background */
color: #333;
margin: 0;
padding: 20px;
display: flex;
flex-direction: column;
align-items: center; /* Center content */
}
h1 {
color: #1e90ff; /* Dodger blue */
text-align: center;
}
.results {
text-align: center;
margin-top: 20px;
}
.results img {
max-width: 300px;
}
form {
display: flex;
flex-direction: column;
align-items: center; /* Center the form elements */
}
input[type="text"] {
width: 300px; /* Increase width */
height: 40px; /* Increase height */
padding: 10px; /* Add padding */
font-size: 16px; /* Increase font size */
border: 2px solid #1e90ff; /* Border color */
border-radius: 5px; /* Rounded corners */
margin-bottom: 10px; /* Space below the input */
}
button {
background-color: #1e90ff; /* Button color */
color: white; /* Text color */
padding: 10px 20px; /* Padding */
border: none; /* Remove border */
border-radius: 5px; /* Rounded corners */
font-size: 16px; /* Increase font size */
cursor: pointer; /* Pointer cursor on hover */
}
button:hover {
background-color: #007acc; /* Darker blue on hover */
}
.header-menu {
background-color: #007BFF;
padding: 10px;
text-align: center;
}
.header-menu a {
color: white;
margin: 0 15px;
text-decoration: none;
font-weight: bold;
}
.header-menu a:hover {
text-decoration: underline;
}
</style>
</head>
<body>
<!-- Header Menu -->
<div class="header-menu">
<a href="index.php">Home</a>
<a href="obd_code_lookup.php">Obd code</a>
<a href="ecu_model_info.php">Ecu PIN</a>
<a href="pinout_airbag.php">Airbag PIN</a>
<a href="fuse_box.php">Fuse Box</a>
</div>
<img src="OBD/LOGO.png" alt="OBD Logo" style="max-width: 100%; height: auto; margin-bottom: 20px;">
<h1>OBD Code Lookup</h1>
<form method="POST" action="">
<input type="text" name="obd_code" placeholder="Enter OBD Code" required>
<button type="submit">Lookup</button>
</form>
<?php if (isset($description)): ?>
<div class="results">
<h2>Results:</h2>
<p><strong>Description:</strong> <?php echo $description; ?></p>
<p><strong>More Info:</strong> <?php echo $moreinfo; ?></p>
<img src="<?php echo $imgpath; ?>" alt="Image">
</div>
<?php endif; ?>
</body>
</html>