I have 3 buttons to submit. let's say button A, B, C. Each button press gonna bring data from DB based on the button press. But the template of data is the same.
my question is it possible to dynamically change the query. especially WHERE field in the query.
$sql = "SELECT Name FROM DevicesList WHERE Device='A' ";
What I want is WHERE part should change based on Button press.
//my forms are as follows
<div class="button_style1">
<form action="displayData.php" method="get" target="_blank">
<input type="submit" id ="mybutton1" value="A" />
</form>
</div>
<div class="button_style2">
<form action="displayData.php" method="get" target="_blank">
<input type="submit" id ="mybutton2" value="B" />
</form>
</div>
<div class="button_style3">
<form action="displayData.php" method="get" target="_blank">
<input type="submit" id ="mybutton3" value="C" />
</form>
</div>
//I am trying to avoid creating different pages for each button press. Just one page (displayData.php) but with different data based on button press.