-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpro1.php
More file actions
153 lines (130 loc) · 4.98 KB
/
pro1.php
File metadata and controls
153 lines (130 loc) · 4.98 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
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<?php
session_start();
?><!DOCTYPE html>
<html>
<head>
<meta charset='utf-8'>
<meta http-equiv='X-UA-Compatible' content='IE=edge'>
<title>index</title>
<meta name='viewport' content='width=device-width, initial-scale=1'>
<link rel='stylesheet' type='text/css' media='screen' href='main.css'>
<script src='main.js'></script>
<!-- CSS only -->
<link href="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/css/bootstrap.min.css" rel="stylesheet"
integrity="sha384-Zenh87qX5JnK2Jl0vWa8Ck2rdkQ2Bzep5IDxbcnCeuOxjzrPF/et3URy9Bv1WTRi" crossorigin="anonymous">
<!-- JavaScript Bundle with Popper -->
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.2.2/dist/js/bootstrap.bundle.min.js"
integrity="sha384-OERcA2EqjJCMA+/3y+gxIOqMEjwtxJY7qPCqsdltbNJuaOe923+mo//f6V8Qbsw3"
crossorigin="anonymous"></script>
<!-- Favicon-->
<link rel="icon" type="image/x-icon" href="assets/favicon.ico" />
<!-- Font Awesome icons (free version)-->
<script src="https://use.fontawesome.com/releases/v6.1.0/js/all.js" crossorigin="anonymous"></script>
<!-- Google fonts-->
<link href="https://fonts.googleapis.com/css?family=Montserrat:400,700" rel="stylesheet" type="text/css" />
<link href="https://fonts.googleapis.com/css?family=Roboto+Slab:400,100,300,700" rel="stylesheet" type="text/css" />
<!-- Core theme CSS (includes Bootstrap)-->
<link href="csss/styles.css" rel="stylesheet" />
<link href="vendor/fontawesome-free/css/all.min.css" rel="stylesheet" type="text/css">
<link href="https://fonts.googleapis.com/css?family=Nunito:200,200i,300,300i,400,400i,600,600i,700,700i,800,800i,900,900i" rel="stylesheet">
</head>
<body >
<!--navbar start-->
<nav class="navbar navbar-expand-lg navbar-dark bg-dark">
<div class="container-fluid">
<a class="navbar-brand" href="#">Sofa House</a>
<button class="navbar-toggler" type="button" data-bs-toggle="collapse" data-bs-target="#navbarSupportedContent" aria-controls="navbarSupportedContent" aria-expanded="false" aria-label="Toggle navigation">
<span class="navbar-toggler-icon"></span>
</button>
<div class="collapse navbar-collapse" id="navbarSupportedContent">
<ul class="navbar-nav me-auto mb-2 mb-lg-0">
<li class="nav-item">
<a class="nav-link active" aria-current="page" href="index.php">Home</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="pro1.php">Products</a>
</li>
<li class="nav-item">
<a class="nav-link active">Contact</a>
</li>
<li class="nav-item">
<a class="nav-link active" href="about.php">About</a>
</li>
</ul>
<form class="d-flex" role="search">
<input class="form-control me-2" type="search" placeholder="Search" aria-label="Search">
<button class="btn btn-outline-success" type="submit">Search</button>
</form>
</div>
</div>
</nav>
<!--navbar end-->
<style>
#main{
margin-top: 3rem ;
margin-left:calc(100% - 90rem) ;
display: inline-block;
/* grid-template-columns: 400px 400px 400px; */
/* gap: 3rem; */
}
.main img{
width:400px;
}
.card{
margin-left:35px;
}
.card-img-top{
width: 350px;
height: 200px;
margin-bottom: 50px;
}
.card-img-top:hover{
transform:scale(1.1);
}
#tbl{
display: inline;
}
</style>
</head>
<div class="table-responsive" id="tbl">
<?php
$connection = mysqli_connect("localhost","root","","add");
$query= "SELECT * from fer ";
$query_run = mysqli_query($connection,$query);
?>
<body>
<?php
if(mysqli_num_rows($query_run)>0)
{
while($row = mysqli_fetch_assoc($query_run))
{
?>
<div id="main">
<div class="card" style="width: 350px; margin-left:100px; border: none; border-bottom: 3px solid #ddd; border-radius: 0%;">
<?php echo '<img src="../admin/upload/'.$row['image'].'" class="card-img-top" alt="Error" width="200px" height="200px" style="border-radius: 0px;">'?>
<div class="card-body">
<h5 class="card-title" style="font-weight:bold;"><?php echo $row['tittle'];?></h5>
<p class="card-text" style="font-weight:bold;">
<?php echo $row['subtitle'];?></p>
<h2>$ <?php echo $row['price'];?></h2>
<a href="detail.php?id=<?php echo $row['id']?>"><button type="button" class="btn btn-dark">Buy Now</button></a>
</td>
</div>
</div>
</div>
</div>
</body>
</html>
<?php
}
}
else
{
echo"record not found";
}
?>
<footer>
<p class="p-3 bg-dark text-white text-center">Sofa House Copyright 2022 All Right Reserved</p>
</footer>
</body>
</html>