Advertisement
GWibisono

perbaikan

Sep 18th, 2016
93
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <?php
  2. //HARUSNYA
  3. $error=null; /*asumsikan WAJIB*/
  4. try{
  5.     $sql = '';
  6.     $query= $con->prepare($sql);
  7.     $query->bindParam(1, $foto);
  8.     $query->bindParam(2, $foto);
  9.     $result = $query->execute();
  10.     if($result){
  11.     //jalankan script OK
  12.     }
  13.     else{
  14.         die( $error);
  15.    
  16.     }
  17. }
  18. catch(PDOException $e){
  19.     $error= $e->getMessage();
  20.     $result=false;
  21. }
  22.  
  23. /*
  24. script lainnya
  25. */
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement