hi guys i want to fiter data based on user input. user have to select the company in first input and then game in second tab, so i am trying to show them only games from selected company (which user select in first tab). here is my code if anyone can help me plzzz
<div class="form-group">
<label for="company">Company Name</label>
<select name="company" autocomplete="off">
<?php $sql = "SELECT * from clients having manager like '%$uname%'" ;
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->company);?>"><?php echo htmlentities($result->company);?></option>
<?php
}} ?>
</select>
</div>
<div class="form-group">
<label for="game">Game Name</label>
<select name="game" autocomplete="off">
<?php $sql = "SELECT * from clientgames having company like '%..........????......%'" ;
$query = $dbh -> prepare($sql);
$query->execute();
$results=$query->fetchAll(PDO::FETCH_OBJ);
$cnt=1;
if($query->rowCount() > 0)
{
foreach($results as $result)
{ ?>
<option value="<?php echo htmlentities($result->gamename);?>"><?php echo htmlentities($result->gamename);?></option>
<?php }} ?>
</select>
</div>```