I need to filter date(curdate) and id of doctor to see dates for each doctor(every doctor need only see his/her only dates for each day..
I have this code that works if I don't put this ,id_doctor = GET['id_doctor'] in where clause
    <table class="table table-striped table-bordered bootstrap-datatable datatable">
    <thead>
    <tr>
    <th>Fecha</th>
    <th>Hora</th>
    <th>Nombre de Paciente</th>
    <th>Acciones</th>
    </tr>
    </thead>
    <tbody>
    <? $sql = "SELECT * FROM CITAS WHERE f_cita = CURDATE(),id_doctor = GET['id_doctor'] ORDER BY f_cita, h_cita ASC";
    $result = $conn->query($sql);
    while($row = $result->fetch(PDO::FETCH_ASSOC)) {
    ?>
    <tr>
    <td><
? echo $row['f_cita'] ?></td>
<td><? echo $row['h_cita'] ?></td>
<td><? echo $row['nombrep'] ?></td>
<td><a class="btn btn-success" href=paciente_personal_profile.php?id_paciente=<? echo $row['id_paciente']; ?>>
<i class="icon-user icon-white"></i> Ver Perfil</a>
</td>
</tr><? } ?>
</tbody>
</table>
I have this FK (id_paciente and id_doctor) in table CITAS but I need when "x" id_doctor login into the system he/she only can see his/her dates...
can you help me with this, please?
best regards!
 
     
    