I want to submit one value but still keep the other one. Because when I press the button for the second one, the value of the first one is overwritten by the second one.
<div>
<select name="cityId" class="form-control" >
<option>Qytetet</option>
<?php
$query="SELECT * FROM categories_table_city";
$sql=mysqli_query($conn, $query);
while ($row=mysqli_fetch_array($sql))
{ ?>
<option value="<?= $row['categorySlug']?>" <?php if (isset($_GET['cityId']) && $_GET['cityId'] == $row['categorySlug']){echo "selected";}?>>
<?= $row['categoryName'] ?>
</option>
<?php
}
?>
</select>
<button type="submit" class="input-group-text btn btn-danger" id="basic-addon2">
Perfundo
</button>
</div>
<div>
<select name="categoryId" id="" class="form-control">
<option>Kategorit</option>
<?php
$query="SELECT * FROM categories_table";
$sql=mysqli_query($conn, $query);
while ($row=mysqli_fetch_array($sql))
{ ?>
<option value="<?= $row['categorySlug']?>" <?php if (isset($_GET['categoryId']) && $_GET['categoryId'] == $row['categorySlug']){echo "selected";}?>>
<?= $row['categoryName'] ?>
</option>
<?php
}
?>
</select>
<button type="submit" class="input-group-text btn btn-danger" id="basic-addon2">
Perfundo
</button>
</div>
But I still need a button foreach one.