'form values not passing through action url in php
I have a simple form made in PHP, I am trying to pass the select value in the page mentioned in the action URL,
<form action="filtertable.php" method="post">
<select class="form-select" name="filtercategory" aria-label="Default select example"
onchange="this.form.submit()">
<option selected>Select Category</option>
<option value="<?php echo $roww["c_id"]; ?>"><?php echo $roww["cname"]; ?></option>
</select>
</form>
when the user selects on any select box it will go to the page filtertable.php, and from there am trying to get the selected value like this:
<?php
$filtercategory=$_POST['filtercategory'];
However it doesn't work, can anyone please tell me what is wrong in here, thanks in advance
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
