-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathapp_dev_pricing.php
More file actions
74 lines (63 loc) · 2.97 KB
/
app_dev_pricing.php
File metadata and controls
74 lines (63 loc) · 2.97 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
<div class="sba-pricing-area bg-gray mg-top-105 pd-default-two">
<div class="container">
<div class="row justify-content-center">
<div class="col-xl-6 col-lg-9">
<div class="section-title text-center">
<h3 class="title">App Development <span>Packages</span></h3>
</div>
</div>
</div>
<div class="row custom-gutters-20" id="pricing-packages">
<?php
$servername = "localhost";
$db_username = "your_db_username";
$db_password = "your_db_password";
$dbname = "mbzstore";
$conn = mysqli_connect('localhost', 'root', '', 'mbzstore');
if ($conn->connect_error) {
die("Connection failed: " . $conn->connect_error);
};
include('common_functions.php');
?>
// Fetch services with 'app_packages' category
$sql = "SELECT * FROM products WHERE category_id='3'";
$result = mysqli_query($conn, $sql);
if (mysqli_num_rows($result) > 0) {
while ($row = mysqli_fetch_assoc($result)) {
// Generate HTML for each service package
$product_id=$row['product_id'];
$product_title = $row["product_title"];
$product_description = explode("\n", $row["product_description"]);
$product_keywords = $row["product_keywords"];
$category_id = $row["category_id"];
$product_image = $row["product_image"];
$product_price = $row["product_price"];
echo"<div class='col-xl-4 col-sm-6'>
<div class='single-pricing text-cente'>
<h6 class='title text-center'>$product_title</h6>
<div class='thumb text-center'>
<img src='product_images/$product_image' alt='pricing'>
</div>
<h3 class='price text-center'>$$product_price<span></span></h3>
<ul>";
// Loop through each sentence in the description and create a new <li> element for each
foreach ($product_description as $product_description) {
echo '<li class="bold"><i class="fa-solid fa-check"></i> <span>' . $product_description . '</span></li>';
}
echo "</ul>
<div class='text-center'>
<a class='btn text-center btn-white btn-rounded' href='prices.php?add_to_cart=$product_id'>Add To Cart</a>
</div>
</div>
</div>"
?>
<?php
}
} else {
echo "No packages available for this category.";
}
mysqli_close($conn); // Close the database connection
?>
</div>
</div>
</div>