i want to make an e commerce website and i want to know how to make filter section where people can omit or select a given variety of product. Something like the one in the image.
Any kind of help will be of great use. Thank you.
i want to make an e commerce website and i want to know how to make filter section where people can omit or select a given variety of product. Something like the one in the image.
Any kind of help will be of great use. Thank you.
well you can use php like this i am just giving an example here let's say i have a i have to apply filter first to country than to region so your form will go like this
<form action="this.php" method="post">
<input type="text" name="country">
<input type="text" name="region">
<input type="submit" name="submit" value="submit">
</form>
and your php code will go like this
<?php
if(isset($_POST['country'] && !empty($_POST['country']) && isset($_POST['region'] && !empty($_POST['region']))
{
$country=$_POST['country'];
$region=$_POST['region'];
$connection=mysqli_connect('localhost','yourmysqlusername','yourmysqlpassword','youmysqldatabase');
$query="select * from nameofyourmysqldatabase where country='$country' && region='$region';
$result=mysqli_query($connection,$query)
while($row=mysqli_fetch_array($result))
{
//data you want to display from your database
$data=$row['data'];
echo $data;
}
?>
well it's just an example you need to do lot css,php,jquery,html works but i hope you understand the basic behind it