 
 <?php
header ("Content-Type: text/html; charset=iso-8859-9");
session_start();
ob_start();

 

?>
<?php
include('../baglan.php');
 include('../css.php');


if(isset($_GET['KONSINYE_ISLEM_ID'])) $KONSINYE_ISLEM_ID = $_GET['KONSINYE_ISLEM_ID'];
$baglan = mysql_query("select * from konsinyesatis where KONSINYE_ISLEM_ID='$KONSINYE_ISLEM_ID'"); 

session_start();




$yaz = mysql_fetch_assoc($baglan); // while dongsu icine almadim tek veri cekecegimiz icin. burda get methodunu da kullandık

 
?>
 

<div class="row">
<div class="col-md-6" style="width:90%">
                            <!-- Custom Tabs -->
                         
 


 
 
<form name="form1" method="post" action="satisduzenle-islem.php">


 

<table   border="0" cellpadding="3" cellspacing="3" style="width:90%">
   <tr>
     <td > 
       <input name="KONSINYE_ISLEM_ID" type="hidden" id="KONSINYE_ISLEM_ID" value="<? echo $yaz["KONSINYE_ISLEM_ID"];?>" size="20" /></td>
 
      
   

 
 <label> <strong>Reçete Eden Dr</strong></label> <BR>
 <select name="KONSINYE_RECETE_EDEN_DOKTOR" id="KONSINYE_RECETE_EDEN_DOKTOR"  class="form-control   select2-hidden-accessible">
    <option value="0">Lütfen Bir Doktor Seçiniz</option>
        <?php include('baglan.php'); 

 $sorumlu_kodu=$_SESSION["kullanici_adi"];
$sql = mysql_query("SELECT * FROM doktorlar WHERE DOKTOR_SORUMLU_KODU='$sorumlu_kodu' "); 
while ($a = mysql_fetch_array($sql)) {
if ($yaz[KONSINYE_RECETE_EDEN_DOKTOR] == $a[DOKTOR_ADI]){ $durum=  'selected="selected"'; } else { $durum =''; }?>
      
<option value="<?php echo $a[DOKTOR_ADI];?>" <?php echo $durum; ?> ><?php echo $a[DOKTOR_ADI];?></option>

<?php } ?>
          </select> 
<br>


<label>Eczane Adı</label>
<select name="KONSINYE_ECZANE" id="KONSINYE_ECZANE"   class="form-control">
    <option value="0">Lütfen Bir Eczane Seçiniz</option>
        <?php

$mesut=$_SESSION["kullanici_adi"];
 include('baglan.php'); 
$sql = mysql_query("SELECT * FROM eczane WHERE  DOKTOR_SORUMLU_KODU='$mesut'"); 
while ($a = mysql_fetch_array($sql)) {
if ($yaz[KONSINYE_ECZANE] == $a[DOKTOR_ADI]){ $durum=  'selected="selected"'; } else { $durum =''; }?>
      
<option value="<?php echo $a[DOKTOR_ADI];?>" <?php echo $durum; ?> ><?php echo $a[DOKTOR_ADI];?></option>

<?php } ?>
          </select>

 

<br>


<td>   
      <td><br><input name="button" type="submit" class="button_gri" id="button" value="Satış Düzenle" /></td>
     <td>&nbsp;</td>
   </tr>
 </table>






 



</form>
  </div></div>