<?php

session_start();
require_once '../../../view/classes/view.php';
$obj_view = new View();
if (isset($_GET['value_id'])) {
    $value = intval($_GET['value_id']);
    ?>
    <td>Doctor Name  </td>
    <td>
        <select name="doctor_id" onchange="get_doctor_id_for_shift(this.value);
                ">
            <option value=" ">Select Doctor...</option>
            <?php 
    $select_doctor_by_single_dept = $obj_view->select_doctor_by_single_dept($value);
    while ($row = mysql_fetch_assoc($select_doctor_by_single_dept)) {
        ?>
                <option value="<?php 
        echo $row['doctor_id'];
        ?>
"><?php 
        echo $row['doctor_title'] . ' ' . $row['doctor_first_name'] . ' ' . $row['doctor_last_name'];
        ?>
</option>
                <?php 
    }
    ?>
        </select>
    </td>
    <?php 
}