1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
 
 | 
<?php     include ('../../inc/configure.php');
      $customer_id = $_GET["customer_id"];
      //get project data
      $sql3 = "SELECT * FROM sup_project WHERE customer_id = ? and status = 1";
      if (!($sth = $dbh->prepare($sql3))) {         throw new Exception("sql prepare statement failure: $sql3");     }     //$sth->setFetchMode(PDO::FETCH_ASSOC);     if (!$sth->execute(array($customer_id))) {         throw new Exception("sql execute statement failure: $sql3");     }
      if($sth->rowCount() > 0){ ?>
  <?php $attribute = 'project_id';     $label = 'Project Name'; ?>
          <div class="control-group belong_project">             <label class="control-label">Project Name</label>
              <div class="controls">                 <select id="<?= $attribute ?>" name="<?= $attribute ?>" placeholder="Select a <?= $label ?>" class="required" disabled>                     <!--<option value=""></option>-->                     <?php while ($project = $sth->fetch(PDO::FETCH_ASSOC)){ ?>                         <option value="<?=$project['id'] ?>"><?=$project['project_name'] ?></option>                     <?php } ?>                 </select>             </div>         </div>
          <?php $attribute = 'on_site';         $label = 'Project On-Site?'; ?>         <br>         <div class="control-group belong_project">             <label class="control-label"><?=$label?></label>
              <div class="controls" style="padding-top: 5px;">                 <input type="radio" name="<?=$attribute?>" value="1" required style="margin: 0;"/> Yes                 <input type="radio" name="<?=$attribute?>" value="0" required style="margin: 0;"/> No             </div>         </div>
 
 
 
  <?php     }else{         echo "0";     } ?> 
 |