This here is my form and i am using this form to take the input when a user clicks on it
<?php
global $row6;
$query= "select s.name ,s1.price from services s ,seller_services s1 where s1.service_id = s.id;";
$result= mysqli_query($conn3,$query) or die(mysqli_error($conn3));
while($row6=mysqli_fetch_array($result))
{
?>
<div class="col-md-3 col-sm-4">
<div class="pro-box">
<div class="pro-thumb"><img src="https://udemy-images.udemy.com/course/240x135/1192700_6496_2.jpg" alt=""></div>
<div class="pro-txt"> <a href="#" class="add2cart">class="fa fa-shopping-cart"></a>
<h6><a href="manageservice.php"><?php echo $row6['name'];?></a></h6>
<p class="price">class="fa fa-inr"><?php echo $row6['price'];?></p>
<form action="manageservice.php" method="POST">
<input type="submit" hidden="id" value="buy" namw="buy"/>
</form>
<div class="pro-rating"><a href="#">class="fa fa-star"__^ ^__i class="fa fa-star"> ^__i class="fa fa-star"> ^__i class="fa fa-star"></a></div>
</div>
</div>
</div>
<?php } ?>
and next i have a page manageservices.php where this id shoould go on clciking and now what should happen is all the users having that service id mapped in the corresponding table seller_services must be displayed .
<div class="team-page">
<div class="container">
<div class="row">
<?php
global $row;
if(isset($_POST['buy']))
{
$id=$_POST['id'];
$query5= "Select *from services where id = '$id'; ";
$result=mysqli_query($conn3,$query5) or die("Mysql error");
while($row=mysqli_fetch_array($result))
{
?>
<?php } ?>
<!--Team Box Start-->
<div class="col-md-3 col-sm-6">
<div class="team-box">
<div class="thumb">
<div class="team-hover">
<h6>Michelle WU</h6>
<p>Aliquam nec finibus dui, eget dapibus leo. Suspendisse aliquam, justo in venenatis congue, sem odio vestibulum lorem, quis consectetur arcu nulla in est. </p>
<div class="mayor-social"> <a class="fb" href="#">class="fa fa-facebook" href="#"></a> <a class="lin" href="#">^__i class="fa fa-linkedin"></a> <a class="yt" href="#">^__i class="fa fa-youtube"></a> </div>
</div>
<img src="images/timg-1.jpg" alt=""></div>
<div class="team-txt">
<h5><?php echo $row['name'];?></h5>
<p><?php echo $row['email'];?></p>
</div>
</div>
i am not that good at query writing and also the page just shows a blak screen
here is the databse tables to be used :
1.table relating user id with service id
`seller_services` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`service_id` int(50) NOT NULL,
`subservice_id` int(50) NOT NULL,
`price` int(50) NOT NULL,
`time` varchar(50) NOT NULL,
`user_id` int(50) NOT NULL,
`shop_id` int(50) NOT NULL,
PRIMARY KEY (`id`)
)
2.table services
`services` (
`id` int(11) NOT NULL AUTO_INCREMENT,
`name` varchar(255) NOT NULL,
`image` varchar(255) NOT NULL,
PRIMARY KEY (`id`)
)
table users:
`users` (
`id` int(10) unsigned NOT NULL AUTO_INCREMENT,
`name` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`email` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`password` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`gender` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`phone` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`photo` varchar(191) COLLATE utf8mb4_unicode_ci NOT NULL,
`admin` int(11) NOT NULL,
`remember_token` varchar(100) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
`created_at` timestamp NULL DEFAULT NULL,
`updated_at` timestamp NULL DEFAULT NULL,
PRIMARY KEY (`id`),
UNIQUE KEY `users_email_unique` (`email`)
)
What I have tried:
i have shown u what i tried in the above code i just need help in query and with the white blank space it shows