How to get a value of a select input tag with options taken from a database using POST method?
<pre><code>&lt;form method="post" action="&lt;?php echo htmlspecialchars($_SERVER["PHP_SELF"]);?&gt;"&gt;
    &lt;select name="doctor"&gt;
    &lt;?php 
    $con = mysqli_connect("---","---","---","---") or die("Can't Connect to the Database.");
    $sql = mysqli_query($con, "SELECT Title, Name, LastName FROM physician");
    while ($row = $sql-&gt;fetch_assoc()){
    echo "&lt;option value=\"doctor1\"&gt;" . $row['Title'].' '.$row['Name'].' '.$row['LastName'] . "&lt;/option&gt;";
    }

    ?&gt;
    &lt;/select&gt;
    &amp;nbsp;&lt;input type='submit' value="Filter"&gt;&lt;br&gt;
&lt;/form&gt;
</code></pre>

<p>Above is a form I created. I used POST method. This form has a select input tag and it's options are taken from my database. When form is submitted I need to access the value selected by user using <code>$_POST['doctor']</code> function. But it doesn't give me any value. Can anyone help me? </p>