I have the code:
echo('
<div class="row">
<div class="col-sm-2" >
<form method="POST" action="plan.php">
<p>Selectati data raportului:<br>
<select name="SelectDR" onchange="form.submit()">
<option value="">Select...</option>
');
It is a form from which I select a value.
$option = isset($_POST['SelectDR']) ? $_POST['SelectDR'] : false;
if ($option){
$queryTXT = "SELECT * FROM ".$tabel." WHERE DataRaport='".$option."'";
...
The records of a SQLtable are filtered by the value selected from the form.
Now, what I want is to display in the url plan.php?DataRaport& variable php
I've tried to put in the form url (<form method="POST" action="plan.php?DataRaport'.$option.'">
), but that doesn't show the variable.